RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces)
SOLUTION2: change the .view(...) to .contiguous().view(...).
Actually, 'reshape()' does a similar job as contiguous() under the hood, if it needs.
I am using Pytorch. I got this RuntimeError while evaluating a model. Any idea how to solve this?