The difference between the Pytorch view() function and the permute() function

Obviously, both the view() function and the permute() function can be transposed, that is, the dimension is changed.

Difference: view() can expand a three-dimensional matrix into one-dimensional, but the permute() function cannot.

That is to say, view() can change the dimension and reduce dimensionality. The permute() function cannot change dimensions

Guess you like

Origin blog.csdn.net/Vertira/article/details/131460229