90c4c1e7dc3c3801fa7f62f17cf0ed83215028a5,stellargraph/layer/graphsage.py,MaxPoolingAggregator,build,#MaxPoolingAggregator#Any#,227

Before Change


            and neighbour

        
        if input_shape[1][2] > 0:
            self.w_neigh = self.add_weight(
                name="w_neigh",
                shape=(self.hidden_dim, self.half_output_dim),
                initializer=self._initializer,
                trainable=True,
            )
            self.w_pool = self.add_weight(
                name="w_pool",
                shape=(input_shape[1][3], self.hidden_dim),
                initializer=self._initializer,
                trainable=True,
            )
            self.b_pool = self.add_weight(
                name="b_pool",
                shape=(self.hidden_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


        
        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: 20

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: MaxPoolingAggregator
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


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