3

My code is

a=torch.randn(1,80,100,requires_grad=True)
torch.onnx.export(waveglow,a, "waveglow.onnx")

I am trying to export a PyTorch model to ONNX format so i can use it in TensorRT. while testing my model in PyTorch the input tensor dimension is (1,80,x) where x varies depending on the input text length(the model i am using is TTS model named waveglow)

when i try to run the above code for exporting the model to onnx, I am always getting this error

RuntimeError: Only tuples, lists and Variables supported as JIT inputs, but got NoneType

Please help

Sergii Dymchenko
  • 6,890
  • 1
  • 21
  • 46

1 Answers1

2

Given that you have NoneType, perhaps you could check if there is an actual input, because the fact is, you actually got None.

Also, any reason to not use Variable? Variable converts your inputs to a tensor that can be accepted as an input for torch.onnx.export.

macman
  • 91
  • 1
  • 7