I got this error while trying to convert nn.module to torchscript.

terminate called after throwing an instance of ‘torch::jit::ErrorReport’
what():
Unknown builtin op: aten::_convolution_mode.
Could not find any similar ops to aten::_convolution_mode. This op may not exist or may not be currently supported in TorchScript.
:
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/conv.py(298): _conv_forward
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/conv.py(301): forward
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/module.py(1090): _slow_forward
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/module.py(1102): _call_impl
/Users/yanerrol/Desktop/DGA/cnnlstm_torch/model2model.py(36): forward
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/module.py(1090): _slow_forward
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/nn/modules/module.py(1102): _call_impl
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/jit/_trace.py(965): trace_module
/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/torch/jit/_trace.py(767): trace
/Users/yanerrol/Desktop/DGA/cnnlstm_torch/model2model.py(52):
Serialized File “code/torch/torch/nn/modules/conv.py”, line 12
bias = self.bias
weight = self.weight
input = torch._convolution_mode(argument_1, weight, bias, [1], “same”, [1], 1)
~~~~~~~~~~~~~~~~~~~~~~~ <— HERE
return input

Aborted


pytorch==1.10.2

Are you seeing the same issue using the latest stable or nightly release?