a1b1f343d1213127518c12be84ad313c75f375ff,sonnet/python/modules/conv_gpu_test.py,Conv3DTestDataFormats,testConv3DDataFormats,#Conv3DTestDataFormats#Any#Any#,231
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
stride=stride,
initializers=create_initializers(use_bias))
conv1 = func(name="NDHWC", data_format="NDHWC")
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="NCDHW", data_format="NCDHW", custom_getter=custom_getter)
x_transpose = tf.transpose(x, perm=(0, 4, 1, 2, 3))
o2 = tf.transpose(conv2(x_transpose), perm=(0, 2, 3, 4, 1))
self.checkEquality(o1, o2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
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: Conv3DTestDataFormats
Method Name: testConv3DDataFormats
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
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