869b558268f198de90822e4ea17182dc74b78213,sonnet/python/modules/conv.py,Conv2D,_build,#Conv2D#Any#,315

Before Change


        if mask_shape != self._kernel_shape:
          raise base.IncompatibleShapeError(
              "Invalid mask shape: {}".format(mask_shape))
        mask = np.reshape(self._mask, self._kernel_shape + (1, 1))
      elif mask_rank == 4:
        if mask_shape != tuple(weight_shape):
          raise base.IncompatibleShapeError(
              "Invalid mask shape: {}".format(mask_shape))

After Change


      mask = self._mask
      mask_shape = mask.shape.as_list()
      if len(mask_shape) == 2:
        if mask_shape != list(self._kernel_shape):
          raise base.IncompatibleShapeError(
              "Invalid mask shape: {}".format(tuple(mask_shape)))
        mask = tf.expand_dims(tf.expand_dims(mask, -1), -1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepmind/sonnet
Commit Name: 869b558268f198de90822e4ea17182dc74b78213
Time: 2017-11-09
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: Conv2D
Method Name: _build


Project Name: keras-team/keras
Commit Name: 45a10bc6d708fade197a37bfbc62312caf70e6a7
Time: 2017-02-17
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional_recurrent.py
Class Name: ConvLSTM2D
Method Name: get_constants


Project Name: asyml/texar
Commit Name: bb033219cbc78a5a0f934c1f0453fe7ace9934bc
Time: 2018-08-21
Author: zhitinghu@gmail.com
File Name: texar/modules/policies/policy_nets.py
Class Name: CategoricalPolicyNet
Method Name: _build