69f5869f3b6d190ed99e156a932634393ab361dd,python/dgl/nn/pytorch/conv/sageconv.py,SAGEConv,__init__,#SAGEConv#Any#Any#Any#Any#Any#Any#Any#,50
Before Change
// aggregator type: mean/pool/lstm/gcn
if aggregator_type == "pool":
self.fc_pool = nn.Linear(self._in_src_feats, self._in_src_feats)
if aggregator_type == "lstm":
self.lstm = nn.LSTM(self._in_src_feats, self._in_src_feats, batch_first=True)
if aggregator_type != "gcn":
self.fc_self = nn.Linear(self._in_dst_feats, out_feats, bias=bias)
self.fc_neigh = nn.Linear(self._in_src_feats, out_feats, bias=bias)
self.reset_parameters()
After Change
self.lstm = nn.LSTM(self._in_src_feats, self._in_src_feats, batch_first=True)
if aggregator_type != "gcn":
self.fc_self = nn.Linear(self._in_dst_feats, out_feats, bias=bias)
self.fc_neigh = nn.Linear(self._in_src_feats, out_feats, bias=bias)
self.reset_parameters()
def reset_parameters(self):
r
Description
-----------
Reinitialize learnable parameters.
Notes
-----
The linear weights :math:`W^{(l)}` are initialized using Glorot uniform initialization.
The LSTM module is using xavier initialization method for its weights.
gain = nn.init.calculate_gain("relu")
if self._aggre_type == "pool":
nn.init.xavier_uniform_(self.fc_pool.weight, gain=gain)
if self._aggre_type == "lstm":
self.lstm.reset_parameters()
if self._aggre_type != "gcn":
nn.init.xavier_uniform_(self.fc_self.weight, gain=gain)
nn.init.xavier_uniform_(self.fc_neigh.weight, gain=gain)
def _lstm_reducer(self, nodes):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dmlc/dgl
Commit Name: 69f5869f3b6d190ed99e156a932634393ab361dd
Time: 2020-08-12
Author: xiaotj1990327@gmail.com
File Name: python/dgl/nn/pytorch/conv/sageconv.py
Class Name: SAGEConv
Method Name: __init__
Project Name: pyannote/pyannote-audio
Commit Name: 78197159b897391afd44862381694134bb8d049f
Time: 2017-01-11
Author: bredin@limsi.fr
File Name: pyannote/audio/labeling/models.py
Class Name: StackedLSTM
Method Name: __call__
Project Name: pyannote/pyannote-audio
Commit Name: 14a9d386baf93b8266fa21277b40d669a4e397d2
Time: 2016-11-14
Author: hbredin@users.noreply.github.com
File Name: pyannote/audio/embedding/models.py
Class Name: TristouNet
Method Name: __call__