Pytorch 1.0 resize_ usage

Hi,

I am using pytorch 1.0 and want to load a pytorch 0.41 model (from a research code) but get the following error:

“RuntimeError: set_sizes_contiguous is not allowed on Tensor created from .data or .detach()”

While I checked my code, the error comes from the following line:

" param.resize_(input_param.size())"

print(param.shape) =>torch.Size([64, 3, 7, 7])
print(input_param.shape)=>torch.Size([58, 3, 7, 7])

anyone knows how to use the resize in my case? I double check the code in pytorch 0.41, it has not errors.

Thanks

This issue will maybe help you to understand the problem.

It’s hard to tell what exactly to do without seeing more code.

Thanks for the reply.

I think my question is why it has not error when I change the pytorch to 0.41.

I didn’t any change on the documentation side on this function resize_