b52e083827ce7aefda75c4370db0ad6942e27dae,stellar/mapper/node_mappers.py,HinSAGENodeMapper,__getitem__,#HinSAGENodeMapper#Any#,355

Before Change


        // Get sampling schema for head nodes
        sampling_schema = self._sampling_schema
        if sampling_schema is None:
            head_node_types = set([self.schema.get_node_type(n) for n in head_nodes])
            if len(head_node_types) > 1:
                raise ValueError(
                    "Only a single head node type is currently supported for HinSAGE models"

After Change



        // Get features
        batch_feats = [
            self.graph.get_feature_for_nodes(layer_nodes, nt)
            for nt, layer_nodes in nodes_by_type
        ]

        // Resize features to (batch_size, n_neighbours, feature_size)
        batch_feats = [
            np.reshape(a, (len(head_nodes), -1 if np.size(a) > 0 else 0, a.shape[1]))
            for a in batch_feats
        ]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: stellargraph/stellargraph
Commit Name: b52e083827ce7aefda75c4370db0ad6942e27dae
Time: 2018-08-12
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: HinSAGENodeMapper
Method Name: __getitem__


Project Name: stellargraph/stellargraph
Commit Name: 33ee48fe46e47492c4f9ff173771dcad51304fe9
Time: 2018-08-20
Author: yuriy.tyshetskiy@data61.csiro.au
File Name: stellar/mapper/link_mappers.py
Class Name: HinSAGELinkMapper
Method Name: _get_features


Project Name: stellargraph/stellargraph
Commit Name: f0a7e9c927914998927347f330fc2314f788b4cd
Time: 2018-08-16
Author: yuriy.tyshetskiy@data61.csiro.au
File Name: stellar/mapper/link_mappers.py
Class Name: GraphSAGELinkMapper
Method Name: _get_features