I want to transpose a 3D matrix, it can be done by .t() in PyTorch v0.1. However, I update my PyTorch version and I can’t do it this way.
The error log is like this:
raise RuntimeError(“t() expects a 2D Variable, but self is {}D”.format(self.dim()))
RuntimeError: t() expects a 2D Variable, but self is 3D