docstr: Tests that tf.nn.conv3d produces the expected value.
  
  Args:
    input_sizes: Input tensor dimensions in [batch, input_rows, input_cols,
      input_depth].
    filter_sizes: Filter tensor dimensions in [kernel_rows, kernel_cols,
      input_depth, output_depth].
    strides: Strides.
    dilations: RHS dilations.
    padding: Padding type.
    data_format_src: Data format input is in.
    data_format_dst: Data format verification will run and input is converted
      to.
    expected: Expected output.
    op_name: Name of operation to test (Conv/Conv2D)
docstr_tok: ["Tests","that","tf.nn.conv3d","produces","the","expected","value",".","Args",":","input_sizes",":","Input","tensor","dimensions","in","[","batch",",","input_rows",",","input_cols",",","input_depth","]",".","filter_sizes",":","Filter","tensor","dimensions","in","[","kernel_rows",",","kernel_cols",",","input_depth",",","output_depth","]",".","strides",":","Strides",".","dilations",":","RHS","dilations",".","padding",":","Padding","type",".","data_format_src",":","Data","format","input","is","in",".","data_format_dst",":","Data","format","verification","will","run","and","input","is","converted","to",".","expected",":","Expected","output",".","op_name",":","Name","of","operation","to","test","(","Conv\/Conv2D",")"]
code: def _VerifyValues(
      self,
      input_sizes=None,
      filter_sizes=None,
      strides=None,
      dilations=None,
      padding=None,
      data_format_src="NDHWC",
      data_format_dst="NDHWC",
      expected=None,
      op_name="Conv3D",
  ):
      """Tests that tf.nn.conv3d produces the expected value.
  
      Args:
        input_sizes: Input tensor dimensions in [batch, input_rows, input_cols,
          input_depth].
        filter_sizes: Filter tensor dimensions in [kernel_rows, kernel_cols,
          input_depth, output_depth].
        strides: Strides.
        dilations: RHS dilations.
        padding: Padding type.
        data_format_src: Data format input is in.
        data_format_dst: Data format verification will run and input is converted
          to.
        expected: Expected output.
        op_name: Name of operation to test (Conv/Conv2D)
      """
  
      total_size_1 = np.prod(input_sizes)
      total_size_2 = np.prod(filter_sizes)
      x1 = np.reshape(
          [f * 1.0 / total_size_1 for f in range(1, total_size_1 + 1)],
          input_sizes,
      )
      x2 = np.reshape(
          [f * 1.0 / total_size_2 for f in range(1, total_size_2 + 1)],
          filter_sizes,
      )
      strides = [1] + strides + [1]
      if dilations is None:
          dilations = [1, 1, 1]
      dilations = [1] + dilations + [1]
  
      # Convert between data formats.
      expected = test_utils.ConvertBetweenDataFormats(
          expected, data_format_src, data_format_dst
      )
      x1 = test_utils.ConvertBetweenDataFormats(
          x1, data_format_src, data_format_dst
      )
      input_sizes = test_utils.PermuteDimsBetweenDataFormats(
          input_sizes, data_format_src, data_format_dst
      )
      strides = test_utils.PermuteDimsBetweenDataFormats(
          strides, data_format_src, data_format_dst
      )
      dilations = test_utils.PermuteDimsBetweenDataFormats(
          dilations, data_format_src, data_format_dst
      )
  
      with self.session() as sess:
          t1 = array_ops.placeholder(dtypes.bfloat16, shape=input_sizes)
          t2 = array_ops.placeholder(
              dtypes.bfloat16, shape=filter_sizes
          )
          with self.test_scope():
              if op_name == "Conv":
                  conv_format = (
                      "CHANNELS_LAST"
                      if data_format_dst == "NDHWC"
                      else "CHANNELS_FIRST"
                  )
                  out = gen_nn_ops.conv(
                      t1,
                      t2,
                      strides=strides,
                      padding=padding,
                      data_format=conv_format,
                      dilations=dilations,
                  )
              elif op_name == "Conv3D":
                  out = nn_ops.conv3d(
                      t1,
                      t2,
                      strides=strides,
                      padding=padding,
                      data_format=data_format_dst,
                      dilations=dilations,
                  )
              else:
                  raise ValueError("Invalid op name: %s" % op_name)
  
          value = sess.run(out, {t1: x1, t2: x2})
          self.assertAllCloseAccordingToType(expected, value)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.compiler.tests import xla_test
  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 gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the Conv3DTest obj's underlying member method code with example usage: obj._VerifyValues(input_sizes, filter_sizes, strides, dilations, padding, data_format_src, data_format_dst, expected, op_name) without return types