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: 3

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: havakv/pycox
Commit Name: 190d9b204a1a4798f0723c8d8d37ac5ac950909e
Time: 2019-05-08
Author: haavard.kvamme@gmail..com
File Name: pycox/models/deephit.py
Class Name: DeepHitSingle
Method Name: predict_survival_function