af61e2fbb45c53df3ff2a91f81a2026a8f66d90d,python/dgl/nn/mxnet/conv/sageconv.py,SAGEConv,__init__,#SAGEConv#Any#Any#Any#Any#Any#Any#Any#,50
Before Change
activation=None):
super(SAGEConv, self).__init__()
if isinstance(in_feats, tuple):
self._in_src_feats = in_feats[0]
self._in_dst_feats = in_feats[1]
elif isinstance(in_feats, Integral):
self._in_src_feats = self._in_dst_feats = in_feats
else:
raise TypeError("in_feats must be either int or pair of ints")
self._out_feats = out_feats
self._aggre_type = aggregator_type
with self.name_scope():
self.norm = norm
self.feat_drop = nn.Dropout(feat_drop)
self.activation = activation
if aggregator_type == "pool":
self.fc_pool = nn.Dense(self._in_src_feats, use_bias=bias,
weight_initializer=mx.init.Xavier(magnitude=math.sqrt(2.0)),
in_units=self._in_src_feats)
if aggregator_type == "lstm":
raise NotImplementedError
if aggregator_type != "gcn":
self.fc_self = nn.Dense(out_feats, use_bias=bias,
weight_initializer=mx.init.Xavier(magnitude=math.sqrt(2.0)),
in_units=self._in_dst_feats)
self.fc_neigh = nn.Dense(out_feats, use_bias=bias,
weight_initializer=mx.init.Xavier(magnitude=math.sqrt(2.0)),
in_units=self._in_src_feats)
After Change
activation=None):
super(SAGEConv, self).__init__()
self._in_src_feats, self._in_dst_feats = expand_as_pair(in_feats)
self._out_feats = out_feats
self._aggre_type = aggregator_type
with self.name_scope():
self.norm = norm
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 18
Instances
Project Name: dmlc/dgl
Commit Name: af61e2fbb45c53df3ff2a91f81a2026a8f66d90d
Time: 2020-03-29
Author: expye@outlook.com
File Name: python/dgl/nn/mxnet/conv/sageconv.py
Class Name: SAGEConv
Method Name: __init__
Project Name: dmlc/dgl
Commit Name: af61e2fbb45c53df3ff2a91f81a2026a8f66d90d
Time: 2020-03-29
Author: expye@outlook.com
File Name: python/dgl/nn/tensorflow/conv/sageconv.py
Class Name: SAGEConv
Method Name: __init__
Project Name: dmlc/dgl
Commit Name: af61e2fbb45c53df3ff2a91f81a2026a8f66d90d
Time: 2020-03-29
Author: expye@outlook.com
File Name: python/dgl/nn/mxnet/conv/sageconv.py
Class Name: SAGEConv
Method Name: __init__
Project Name: dmlc/dgl
Commit Name: af61e2fbb45c53df3ff2a91f81a2026a8f66d90d
Time: 2020-03-29
Author: expye@outlook.com
File Name: python/dgl/nn/pytorch/conv/sageconv.py
Class Name: SAGEConv
Method Name: __init__