Successfully solved the problem of RuntimeError: view size is not compatible with input tensor's size and stride...

Error message: 

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

 Solution: Change x.view() to x.reshape(), easy to do in one step

Guess you like

Origin blog.csdn.net/weixin_61745097/article/details/128070777