62386f9bdb92662267f18fcf766c84ef6d0e7124,sonnet/python/modules/conv.py,_ConvND,_apply_mask,#_ConvND#,525

Before Change


      )
    if self._mask.shape != w.shape[:self._mask.shape.ndims]:
      raise base.IncompatibleShapeError(
          "Invalid mask shape: {}. Weight shape: {}".format(
              self._mask.shape, w.shape
          )
      )
    // TF broadcasting is a bit fragile.
    // Expand the shape of self._mask by one dim at a time to the right
    // until the rank matches `weight_shape`.

After Change


          match on shape.
    
    w = self._w
    w_shape = w.get_shape()
    mask_shape = self._mask.get_shape()

    if mask_shape.ndims > w_shape.ndims:
      raise base.IncompatibleShapeError(
          "Invalid mask shape: {}. Max shape: {}".format(
              mask_shape.ndims, len(self._data_format)
          )
      )
    if mask_shape != w_shape[:mask_shape.ndims]:
      raise base.IncompatibleShapeError(
          "Invalid mask shape: {}. Weight shape: {}".format(
              mask_shape, w_shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepmind/sonnet
Commit Name: 62386f9bdb92662267f18fcf766c84ef6d0e7124
Time: 2018-07-17
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: _ConvND
Method Name: _apply_mask


Project Name: keras-team/keras
Commit Name: 9bc2e60fd587389701c077f5bbff69250d6fb0b1
Time: 2016-09-07
Author: kuza55@gmail.com
File Name: keras/callbacks.py
Class Name: TensorBoard
Method Name: _set_model


Project Name: NifTK/NiftyNet
Commit Name: 5e8a0c73031db807c0e41ec8bc75f37d6e1b7d30
Time: 2017-05-07
Author: wenqi.li@ucl.ac.uk
File Name: layer/convolution.py
Class Name: ConvBNLayer
Method Name: layer_op