parameters: (input, name=None)
return_statement: return tf.tensordot(input, tf.transpose(kernel), axes=((-1,), (0,)))
docstring: Convert a RGB image to YDbDr.
  
      Args:
        input: A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
        name: A name for the operation (optional).
  
      Returns:
        A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
docstring_summary: Convert a RGB image to YDbDr.
docstring_tokens: Convert a RGB image to YDbDr .
function: def rgb_to_ydbdr(input, name=None):
      """
      Convert a RGB image to YDbDr.
  
      Args:
        input: A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
        name: A name for the operation (optional).
  
      Returns:
        A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
      """
      input = tf.convert_to_tensor(input)
      assert input.dtype in (tf.float16, tf.float32, tf.float64)
  
      kernel = tf.constant(
          [[0.299, 0.587, 0.114], [-0.45, -0.883, 1.333], [-1.333, 1.116, 0.217]],
          input.dtype,
      )
  
      return tf.tensordot(input, tf.transpose(kernel), axes=((-1,), (0,)))
function_tokens: def rgb_to_ydbdr ( input , name = None ) : input = tf . convert_to_tensor ( input ) assert input . dtype in ( tf . float16 , tf . float32 , tf . float64 ) kernel = tf . constant ( [ [ 0.299 , 0.587 , 0.114 ] , [ - 0.45 , - 0.883 , 1.333 ] , [ - 1.333 , 1.116 , 0.217 ] ] , input . dtype , ) return tf . tensordot ( input , tf . transpose ( kernel ) , axes = ( ( - 1 , ) , ( 0 , ) ) )