|
pytroch新手,写的一小段代码,发现报错:
- batch_size, c, h, w = input.size()
- rh, rw = (2, 2)
- oh, ow = h * rh, w * rw
- oc = c // (rh * rw)
- out = input.view(batch_size, rh, rw, oc, h, w)
- out = out.permute(0, 3, 4, 1, 5, 2)
- out = out.view(batch_size, oc, oh, ow)
复制代码 报错如下:
- invalid argument 2: input is not contiguous at /pytorch/torch/lib/THC/generic/THCTensor.c:227
复制代码 求大神告知
|
|