a1b1f343d1213127518c12be84ad313c75f375ff,sonnet/python/modules/conv_gpu_test.py,Conv1DTestDataFormats,testConv1DDataFormats,#Conv1DTestDataFormats#Any#Any#,64

Before Change


        kernel_shape=self.KERNEL_SHAPE,
        use_bias=use_bias,
        stride=stride,
        initializers=create_constant_initializers(1.0, 1.0, use_bias))
    x = tf.constant(np.random.random(self.INPUT_SHAPE).astype(np.float32))
    self.helperDataFormats(func, x)

  @parameterized.named_parameters(
      ("WithBias_Stride1", True, 1), ("WithoutBias_Stride1", False, 1),
      ("WithBias_Stride2", True, 2), ("WithoutBias_Stride2", False, 2))

After Change



    conv1 = func(name="NWC", data_format="NWC")
    x = tf.constant(np.random.random(self.INPUT_SHAPE).astype(np.float32))
    o1 = conv1(x)

    // We will force both modules to share the same weights by creating
    // a custom getter that returns the weights from the first conv module when
    // tf.get_variable is called.
    custom_getter = {"w": create_custom_field_getter(conv1, "w"),
                     "b": create_custom_field_getter(conv1, "b")}
    conv2 = func(name="NCW", data_format="NCW", custom_getter=custom_getter)
    x_transpose = tf.transpose(x, perm=(0, 2, 1))
    o2 = tf.transpose(conv2(x_transpose), perm=(0, 2, 1))

    self.checkEquality(o1, o2)

  @parameterized.named_parameters(("WithBias", True), ("WithoutBias", False))
  def testConv1DDataFormatsBatchNorm(self, use_bias):
    Similar to `testConv1DDataFormats`, but this checks BatchNorm support.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: deepmind/sonnet
Commit Name: a1b1f343d1213127518c12be84ad313c75f375ff
Time: 2018-01-08
Author: noreply@google.com
File Name: sonnet/python/modules/conv_gpu_test.py
Class Name: Conv1DTestDataFormats
Method Name: testConv1DDataFormats


Project Name: deepmind/sonnet
Commit Name: a1b1f343d1213127518c12be84ad313c75f375ff
Time: 2018-01-08
Author: noreply@google.com
File Name: sonnet/python/modules/conv_gpu_test.py
Class Name: Conv2DTestDataFormats
Method Name: testConv2DDataFormats


Project Name: deepmind/sonnet
Commit Name: a1b1f343d1213127518c12be84ad313c75f375ff
Time: 2018-01-08
Author: noreply@google.com
File Name: sonnet/python/modules/conv_gpu_test.py
Class Name: Conv3DTestDataFormats
Method Name: testConv3DDataFormats