class_docstr: Layer transposes input tensor. Permutes the dimensions according
  to the ``perm`` parameter.
  
  Parameters
  ----------
  perm : tuple or list
      A permutation of the dimensions of the input tensor.
  
  {BaseLayer.name}
  
  Methods
  -------
  {BaseLayer.Methods}
  
  Attributes
  ----------
  {BaseLayer.Attributes}
  
  Examples
  --------
  >>> from neupy.layers import *
  >>> network = Input((7, 11)) >> Transpose((0, 2, 1))
  (?, 7, 11) -> [... 2 layers ...] -> (?, 11, 7)
class_docstr_tok: ["Layer","transposes","input","tensor",".","Permutes","the","dimensions","according","to","the","``","perm","``","parameter",".","Parameters","--","--","--","--","--","perm",":","tuple","or","list","A","permutation","of","the","dimensions","of","the","input","tensor",".","{","BaseLayer.name","}","Methods","--","--","--","-","{","BaseLayer.Methods","}","Attributes","--","--","--","--","--","{","BaseLayer.Attributes","}","Examples","--","--","--","--",">",">",">","from","neupy.layers","import","*",">",">",">","network","=","Input","(","(","7",",","11",")",")",">",">","Transpose","(","(","0",",","2",",","1",")",")","(","?",",","7",",","11",")","-",">","[","...","2","layers","...","]","-",">","(","?",",","11",",","7",")"]
code: def fail_if_shape_invalid(self, input_shape):
      if input_shape and max(self.perm) >= input_shape.ndims:
          raise LayerConnectionError(
              "Cannot apply transpose operation to the "
              "input. Permutation: {}, Input shape: {}"
              "".format(self.perm, input_shape)
          )
  
file_path: neupy/neupy/layers/reshape.py
imports: import numpy
  import tensorflow
  from neupy.utils import as_tuple
  from neupy.exceptions import LayerConnectionError
  from neupy.core.properties import TypedListProperty
  from .base import BaseLayer
label_desc: Use image node_id 2 for calling the Transpose obj's underlying member method code with example usage: obj.fail_if_shape_invalid(input_shape) without return types