Pth to onnx : _convolution_mode error

Hi,

I am trying to convert .pth to .onnx file,

class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        cnn = nn.Sequential()
        cnn.add_module('c1', nn.Conv2d(3, 32, 3, 1, 1))
        cnn.add_module('r1', nn.ReLU())
        .....
        .....
        .....
        cnn.add_module('l3', nn.Linear(512, 2))
        cnn.add_module('ls', nn.LogSoftmax())

        self.cnn = cnn

    def forward(self, x):
        output = self.cnn(x)
        return output

sample_batch_image = torch.zeros(64, 3, 224, 224).to(device)

torch.onnx.export(model, sample_batch_image, 'output.onnx', verbose=True, opset_version=13, export_params=True, training=torch.onnx.TrainingMode.EVAL, do_constant_folding=True, input_names = ['cnn.c1'], output_names=['cnn.ls'], dynamic_axes={'cnn.c1': {0: 'batch'}, 'cnn.ls': {0: 'batch'} ,})

I got this error,

RuntimeError: Exporting the operator _convolution_mode to ONNX opset version 13 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.

I got the same error, did you solve it?

@Matt2 , yes, I update the pytorch version to 1.11, the issue is solved and changed the padding to integer