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

Before Change


        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"
                )
            sampling_schema = self.schema.get_sampling_layout(
                head_node_types, self.num_samples
            )

After Change



        // 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: 5

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: Scitator/catalyst
Commit Name: 1a73a1367fedfa8368b6c42103e60e1b370bc14a
Time: 2019-04-19
Author: scitator@gmail.com
File Name: catalyst/contrib/criterion/focal_loss.py
Class Name: FocalLoss
Method Name: forward


Project Name: PIQuIL/QuCumber
Commit Name: 4b69ca59435931707c8c628eb4de4713c996dd91
Time: 2018-07-31
Author: ijsdevlu@edu.uwaterloo.ca
File Name: qucumber/utils/cplx.py
Class Name:
Method Name: inner_prod