bcf6d0a188ee9ba868c1de01c347f813e3aaa35c,stellargraph/layer/graph_attention.py,GAT,__init__,#GAT#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,636
Before Change
if not isinstance(generator, FullBatchNodeGenerator):
raise ValueError(
"{}: generator must be of type FullBatchNodeGenerator or None; received object of type {} instead".format(
type(self).__name__, type (generator).__name__
)
)
After Change
if generator is None:
self.use_sparse = False
self.multiplicity = kwargs.get("multiplicity", 1)
self.n_nodes = kwargs.get("num_nodes", None)
self.n_features = kwargs.get("num_features", None)
else:
if not isinstance(generator, FullBatchGenerator):
raise TypeError(
"Generator should be a instance of FullBatchNodeGenerator or FullBatchLinkGenerator"
)
// Copy required information from generator
self.use_sparse = generator.use_sparse
self.multiplicity = generator.multiplicity
self.n_nodes = generator.features.shape[0]
self.n_features = generator.features.shape[1]
if self.n_nodes is None or self.n_features is None:
raise RuntimeError(
"node_model: if generator is not provided to object constructor, num_nodes and feature_size must be specified."
)
// Set the normalization layer used in the model
if normalize == "l2":
self._normalization = Lambda(lambda x: K.l2_normalize(x, axis=2))
elif normalize is None or str(normalize).lower() in {"none", "linear"}:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graph_attention.py
Class Name: GAT
Method Name: __init__
Project Name: SPFlow/SPFlow
Commit Name: 178553d4d4edfdc155d876c5ac75aaa1105445ee
Time: 2018-08-15
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/structure/Base.py
Class Name:
Method Name: eval_spn_bottom_up
Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graph_attention.py
Class Name: GAT
Method Name: __init__
Project Name: SPFlow/SPFlow
Commit Name: c52045a02486d7c3793b1083f5b281a1e5fdb4fb
Time: 2018-09-11
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/structure/Base.py
Class Name:
Method Name: eval_spn_bottom_up