목록flow (1)
IT_World
[error]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.
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. 파이토치에서 Pytorch code를 돌리던 중 에러발생 x = x.view(x.size(0), -1) 에러 발생 위치는 그러다가 .contiguous() 를 앞에 붙이라는 글을 보게됐다. x = x.contiguous().view(x.size(0), -1) 무사히 돌아간다. RuntimeError: invalid argument 1: input is not contiguous at contiguous()손..
Artificial intelligence, AI/error
2021. 5. 31. 16:40