68a978d4de27b6625870e1ea4242075e990922f4,examples/pytorch/jtnn/jtnn/jtnn_enc.py,DGLJTNNEncoder,run,#DGLJTNNEncoder#Any#Any#,60

Before Change


    def run(self, mol_tree_batch, mol_tree_batch_lg):
        // Since tree roots are designated to 0.  In the batched graph we can
        // simply find the corresponding node ID by looking at node_offset
        node_offset = np.cumsum([0] + mol_tree_batch.batch_num_nodes)
        root_ids = node_offset[:-1]
        n_nodes = mol_tree_batch.number_of_nodes()
        n_edges = mol_tree_batch.number_of_edges()

After Change


    def run(self, mol_tree_batch, mol_tree_batch_lg):
        // Since tree roots are designated to 0.  In the batched graph we can
        // simply find the corresponding node ID by looking at node_offset
        node_offset = np.cumsum(np.insert(mol_tree_batch.batch_num_nodes().cpu().numpy(), 0, 0))
        root_ids = node_offset[:-1]
        n_nodes = mol_tree_batch.number_of_nodes()
        n_edges = mol_tree_batch.number_of_edges()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: dmlc/dgl
Commit Name: 68a978d4de27b6625870e1ea4242075e990922f4
Time: 2020-07-29
Author: coin2028@hotmail.com
File Name: examples/pytorch/jtnn/jtnn/jtnn_enc.py
Class Name: DGLJTNNEncoder
Method Name: run


Project Name: dmlc/dgl
Commit Name: 68a978d4de27b6625870e1ea4242075e990922f4
Time: 2020-07-29
Author: coin2028@hotmail.com
File Name: examples/pytorch/jtnn/jtnn/jtnn_dec.py
Class Name: DGLJTNNDecoder
Method Name: run


Project Name: HyperGAN/HyperGAN
Commit Name: 365c861ccac7588596907b0cff8ddf69cc7a966c
Time: 2020-07-27
Author: mikkel@255bits.com
File Name: hypergan/samplers/grid_sampler.py
Class Name: GridSampler
Method Name: _sample


Project Name: open-mmlab/mmdetection
Commit Name: e421e832883241bd7831bf77dc31d5fb31d7da58
Time: 2019-04-06
Author: chenkaidev@gmail.com
File Name: mmdet/ops/nms/nms_wrapper.py
Class Name:
Method Name: nms