Error met in relay.from_pytorch

Hi,

I encountered this error when importing a bert model into tvm using relay.from_pytorch.

model = AutoModelForSequenceClassification.from_pretrained(ckp_path)
model.eval()
scripted_model = torch.jit.trace(model, (input_ids, attention_mask)).eval()
mod, params = relay.frontend.from_pytorch(model, shape_list)

I am using transformers==3.0.2, torch==1.4.0 and torchvision==0.5.0. And latest TVM.

Is there a version conflict here? Which versions of transformers are supported by TVM now?

Thanks!

The input to from_torch should be scripted_model , not model.

Thanks!!! Problem solved.