Cannot load pytorch1.7 model in pytorch1.6

I try to use torch.jit.save() save model in pytorch1.7 machine.
But I can not use torch.jit.load() load model in my local machin(pytorch1.6)

ERROR message:
RuntimeError:

aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int stride, int padding, int dilation, bool transposed, int output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) → (Tensor):
Expected at most 12 arguments but found 13 positional arguments.

Serialized File “code/torch/torch/nn/modules/conv.py”, line 11
argument_1: Tensor) → Tensor:
_0 = self.bias
input = torch._convolution(argument_1, self.weight, _0, [1, 1], [0, 0], [1, 1], False, [0, 0], 1, False, False, True, True)
~~~~~~~~~~~~~~~~~~ <— HERE
return input
class ConvTranspose2d(Module):

PyTorch is backwards compatible (unless deprecation warning indicate otherwise), which means you should be able older models (e.g. stored in 1.6) in newer PyTorch versions (e.g. 1.7). However, it’s not forward compatible, so you would need to update your PyTorch version.

1 Like