message: Add test case for partial shape inference with `tf.nn.conv2d_transpose`
diff: @@ -24,8 +24,12 @@ from six.moves import xrange # pylint: disable=redefined-builtin
  from tensorflow.python.client import device_lib
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  +from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import nn_ops
  +from tensorflow.python.ops import random_ops
  +from tensorflow.python.ops import variable_scope
  +from tensorflow.python.ops import variables
  import tensorflow.python.ops.nn_grad # pylint: disable=unused-import
  from tensorflow.python.platform import test
  @@ -290,5 +294,16 @@ class Conv2DTransposeTest(test.TestCase):
  self.assertAllClose(cache_values, value)
  + def testConv2DTransposeShapeInference(self):
  + # Test case for 8972
  + initializer=random_ops.truncated_normal(
  + [3, 3, 5, 1], mean=0.0, stddev=0.01, dtype=dtypes.float32)
  + x = variables.Variable(random_ops.random_normal([3, 10, 5, 1]))
  + f = variable_scope.get_variable('f', initializer=initializer)
  + f_shape = array_ops.stack([array_ops.shape(x)[0], 10, 5, 5])
  + output = nn_ops.conv2d_transpose(
  + x, f, f_shape, strides=[1, 1, 1, 1], padding='SAME')
  + self.assertEqual(output.get_shape().as_list(), [None, 10, 5, 5])
  +
  if __name__ == "__main__":
  test.main()
  