b1e69105d4ad4b998f167e84ef928bf60df63292,python/dgl/nn/pytorch/hetero.py,HeteroGraphConv,__init__,#HeteroGraphConv#Any#Any#,104

Before Change


        // Do not break if graph has 0-in-degree nodes.
        // Because there is no general rule to add self-loop for heterograph.
        for _, v in self.mods.items():
            if hasattr(v, "_allow_zero_in_degree"):
                v._allow_zero_in_degree = True
        if isinstance(aggregate, str):
            self.agg_fn = get_aggregate_fn(aggregate)
        else:
            self.agg_fn = aggregate

After Change


        // Do not break if graph has 0-in-degree nodes.
        // Because there is no general rule to add self-loop for heterograph.
        for _, v in self.mods.items():
            set_allow_zero_in_degree_fn = getattr(v, "set_allow_zero_in_degree", None)
            if callable(set_allow_zero_in_degree_fn):
                set_allow_zero_in_degree_fn(True)
        if isinstance(aggregate, str):
            self.agg_fn = get_aggregate_fn(aggregate)
        else:
            self.agg_fn = aggregate
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: dmlc/dgl
Commit Name: b1e69105d4ad4b998f167e84ef928bf60df63292
Time: 2020-08-16
Author: xiaotj1990327@gmail.com
File Name: python/dgl/nn/pytorch/hetero.py
Class Name: HeteroGraphConv
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: b1e69105d4ad4b998f167e84ef928bf60df63292
Time: 2020-08-16
Author: xiaotj1990327@gmail.com
File Name: python/dgl/nn/mxnet/hetero.py
Class Name: HeteroGraphConv
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: b1e69105d4ad4b998f167e84ef928bf60df63292
Time: 2020-08-16
Author: xiaotj1990327@gmail.com
File Name: python/dgl/nn/tensorflow/hetero.py
Class Name: HeteroGraphConv
Method Name: __init__