87601dbf79396f79bbc3af59b9627b4bd1adef44,stellargraph/layer/graphsage.py,GraphSAGEAggregator,call,#GraphSAGEAggregator#Any#,160

Before Change


        // x[1]: neighbour vector (batch_size, head size, neighbours, feature_size)
        x_self, x_neigh = x

        if self._build_mlp_only:
            return self.apply_mlp(x_self, **kwargs)

        // Weight maxtrix multiplied by self features
        from_self = K.dot(x_self, self.w_self)

        // If there are neighbours aggregate over them
        from_neigh = self.aggregate_neighbours(x_neigh)

        h_out = K.concatenate([from_self, from_neigh], axis=2)

        // Finally, add bias and apply activation
        if self.has_bias:
            h_out = self.act(h_out + self.bias)
        else:
            h_out = self.act(h_out)

        return h_out

    def compute_output_shape(self, input_shape):

After Change


        
        // If a neighbourhood dimension exists for the group, aggregate over the neighbours
        // otherwise create a simple layer.
        sources = []
        for ii, x in enumerate(inputs):
            // If the group is included, apply aggregation and collect the output tensor
            // otherwise, this group is ignored
            if self.included_weight_groups[ii]:
                x_agg = self.group_aggregate(x, group_idx=ii)
                sources.append(x_agg)

        // Concatenate outputs from all groups
        // TODO: Generalize to sum a subset of groups.
        h_out = K.concatenate(sources, axis=2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: stellargraph/stellargraph
Commit Name: 87601dbf79396f79bbc3af59b9627b4bd1adef44
Time: 2019-09-23
Author: 52440942+geoffj-d61@users.noreply.github.com
File Name: stellargraph/layer/graphsage.py
Class Name: GraphSAGEAggregator
Method Name: call


Project Name: erichson/ristretto
Commit Name: 83579d7761d6bc995e1e6e90cd376191e648081e
Time: 2018-03-07
Author: Benli11@users.noreply.github.com
File Name: ristretto/nmf/rnmf_fhals.py
Class Name:
Method Name: rnmf_fhals


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 9da9c8edd24bede6eeeeea8739835ea53ca58cbc
Time: 2018-10-21
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies