90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5,stellargraph/layer/graphsage.py,MeanPoolingAggregator,build,#MeanPoolingAggregator#Any#,318

Before Change


                initializer=self._initializer,
                trainable=True,
            )
            self.w_neigh = self.add_weight(
                name="w_neigh",
                shape=(self.hidden_dim, self.half_output_dim),
                initializer=self._initializer,
                trainable=True,
            )
        else:
            self.w_neigh = None
            self.w_pool = None
            self.b_pool = None

        self.w_self = self.add_weight(
            name="w_self",
            shape=(input_shape[0][2], self.half_output_dim),
            initializer=self._initializer,
            trainable=True,
        )
        if self.has_bias:
            self.bias = self.add_weight(
                name="bias",
                shape=(self.output_dim,),
                initializer="zeros",
                trainable=True,
            )
        super().build(input_shape)

    def aggregate_neighbours(self, x_neigh):
        

After Change


        self.hidden_dim = self.output_dim
        self.hidden_act = activations.get("relu")

    def build(self, input_shape):
        
        Builds layer

        Args:
            input_shape (list of list of int): Shape of input tensors for self
            and neighbour

        
        super().build(input_shape)

        if self._build_mlp_only:
            self.w_neigh = None
            self.w_pool = None
            self.b_pool = None

        else:
            self.w_neigh = self.add_weight(
                name="w_neigh",
                shape=(self.hidden_dim, self.weight_output_size()),
                initializer=self._initializer,
                trainable=True,
            )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: stellargraph/stellargraph
Commit Name: 90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5
Time: 2019-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graphsage.py
Class Name: MeanPoolingAggregator
Method Name: build


Project Name: stellargraph/stellargraph
Commit Name: 90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5
Time: 2019-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graphsage.py
Class Name: MeanAggregator
Method Name: build


Project Name: stellargraph/stellargraph
Commit Name: 90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5
Time: 2019-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graphsage.py
Class Name: MeanPoolingAggregator
Method Name: build


Project Name: stellargraph/stellargraph
Commit Name: 90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5
Time: 2019-01-22
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/graphsage.py
Class Name: MaxPoolingAggregator
Method Name: build