title: No N-dimensional tranpose in PyTorch
body: <p>PyTorch's <code>torch.transpose</code> function only transposes 2D inputs. Documentation is <a href="http://pytorch.org/docs/master/torch.html#torch.transpose" rel="noreferrer">here</a>.</p>
  
  <p>On the other hand, Tensorflow's <code>tf.transpose</code> function allows you to transpose a tensor of <code>N</code> arbitrary dimensions.</p>
  
  <p>Can someone please explain why PyTorch does not/cannot have N-dimension transpose functionality? Is this due to the dynamic nature of the computation graph construction in PyTorch versus Tensorflow's Define-then-Run paradigm?</p>