1 | initial version |
I got the same error in 4.0, 4.1 and the master builds, while trying to import resnet50.onnx, which is the result of onnx export of the existing pretrained resnet50 PyTorch model. You can generate the model using this code.
import torch, torchvision
dummy_input = torch.randn(1, 3, 224, 224)
model = torchvision.models.resnet50(pretrained=True)
torch.onnx.export(model, dummy_input, "resnet50.onnx")