e8065b7e890390dbd9398507d909aa2e955fd9f6,onmt/encoders/ggnn_encoder.py,GGNNEncoder,forward,#GGNNEncoder#Any#Any#,154
Before Change
elif token == self.DELIMITER:
flags += 1
flags_done = True
assert flags <= nodes
elif not flags_done:
// The total number of integers in the vocab should allow
// for all features and edges to be defined.
if token == self.COMMA:
After Change
token_onehot = torch.from_numpy(token_onehot).float().to(src.device)
if self.src_ggnn_size > 0:
token_embed = self.embed(token_onehot)
prop_state = torch.cat((token_embed, torch.zeros(
(batch_size, nodes, self.state_dim - self.src_word_vec_size)
).float().to(src.device)), 2)
else:
prop_state = token_onehot
edges = torch.from_numpy(edges).float().to(src.device)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: OpenNMT/OpenNMT-py
Commit Name: e8065b7e890390dbd9398507d909aa2e955fd9f6
Time: 2021-01-27
Author: steve.kommrusch@gmail.com
File Name: onmt/encoders/ggnn_encoder.py
Class Name: GGNNEncoder
Method Name: forward
Project Name: open-mmlab/mmdetection
Commit Name: 347618a5fbaa70fb9d2124d033275f44fdfcca2f
Time: 2020-05-19
Author: maxim@bonnaerens.be
File Name: tests/test_nms.py
Class Name:
Method Name: test_nms_device_and_dtypes_gpu
Project Name: rusty1s/pytorch_geometric
Commit Name: 14b628e18fdefc250915ddc7b7b39f7880dad6cf
Time: 2019-07-04
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/glob/test_glob.py
Class Name:
Method Name: test_permuted_global_pool
Project Name: dmlc/dgl
Commit Name: af61e2fbb45c53df3ff2a91f81a2026a8f66d90d
Time: 2020-03-29
Author: expye@outlook.com
File Name: tests/pytorch/test_nn.py
Class Name:
Method Name: test_gat_conv