Hello,
I am trying to convert InferSent pre-trained model into ONNX (https://github.com/facebookresearch/InferSent)
which can be downloaded using this,
curl -Lo encoder/infersent.allnli.pickle https://s3.amazonaws.com/senteval/infersent/infersent.allnli.pickle
and loaded into PyTorch by this
model = torch.load(‘infersent.allnli.pickle’, map_location=lambda storage, loc: storage)
However, while saving it into Onnx using the below code, I get
"ValueError: NestedIOFunction doesn’t know how to process an input object of type models.BLSTMEncoder"
import torch.onnx
import torchvision
torch.onnx.export(model, _, “infersent.proto”, verbose=True)
Any help will be appreciated.