parameters: (op)
docstring: Shape function for the Transpose op.
  
    This op takes two inputs:
  
    * input: a rank-N tensor of arbitrary shape.
    * shuffle: a length-N vector.
  
    Its output is the rank-N tensor computed by permuting the dimensions
    of input according to shuffle.
  
    Args:
      op: A Transpose op.
  
    Returns:
      A single-element list containing the shape of the output.
  
    Raises:
      ValueError: If the shapes of input and shuffle are incompatible.
      IndexError: If shuffle contains an index that is >= the rank of input.
docstring_summary: Shape function for the Transpose op.
docstring_tokens: Shape function for the Transpose op .
function: def _TransposeShape(op):
    """Shape function for the Transpose op.
  
    This op takes two inputs:
  
    * input: a rank-N tensor of arbitrary shape.
    * shuffle: a length-N vector.
  
    Its output is the rank-N tensor computed by permuting the dimensions
    of input according to shuffle.
  
    Args:
      op: A Transpose op.
  
    Returns:
      A single-element list containing the shape of the output.
  
    Raises:
      ValueError: If the shapes of input and shuffle are incompatible.
      IndexError: If shuffle contains an index that is >= the rank of input.
    """
    input_shape = op.inputs[0].get_shape()
    transpose_shape = op.inputs[1].get_shape().merge_with(tensor_shape.vector(
        input_shape.ndims))
    transpose_vec = tensor_util.constant_value(op.inputs[1])
    if transpose_vec is None:
      return [tensor_shape.unknown_shape(ndims=transpose_shape[0].value)]
    else:
      return [tensor_shape.TensorShape([input_shape[i]
                                        for i in transpose_vec.tolist()])]
function_tokens: def _TransposeShape ( op ) : input_shape = op . inputs [ 0 ] . get_shape ( ) transpose_shape = op . inputs [ 1 ] . get_shape ( ) . merge_with ( tensor_shape . vector ( input_shape . ndims ) ) transpose_vec = tensor_util . constant_value ( op . inputs [ 1 ] ) if transpose_vec is None : return [ tensor_shape . unknown_shape ( ndims = transpose_shape [ 0 ] . value ) ] else : return [ tensor_shape . TensorShape ( [ input_shape [ i ] for i in transpose_vec . tolist ( ) ] ) ]