I am converting pytorch model into Tensorflow. For that Pytorch-ONNX-Tensorflow this are the steps I am following, but while exporting Pytorch model into ONNX getting the following error: ModuleNotFoundError: No module named 'models'
Below is the code snippet:
trained_model = Net()
trained_model.load_state_dict(torch.load('best.pt'))
dummy_input = Variable(torch.randn(1, 1, 28, 28))
torch.onnx.export(trained_model, dummy_input, "best.onnx")
Any help would be appreciated. Thanks!