Hello, I’am a new to pytorch an python. So… I don’t know how to reshape tensors exactly.
For example, I have a [2, 512, 10, 10] <-- (batch_num, C, H ,W) tensor.
Let’s assume that I apply some channel-wise operations to each cells of the tensor. In this case, the operations applied 200 times (2 * 10 * 10, batch_num * H * W) to the tensor. And the shape of the result is like [200, 512].
In this case, I hope to reshape the result tensor ([200, 512]) to original shape [2, 512, 10, 10].
I think I can reshape the tensor using “view” function easily. However I am worrying that the values of the tensor are mixed. (every cell has to locate original position)
So… Could you tell me how to reshape the tensor properly?
( Sorry, I can’t write English well.)