Hello,
I tried to load dert (GitHub - facebookresearch/detr: End-to-End Object Detection with Transformers) by using ONNX frontend ang got EXC_BAD_ACCESS
.
I converted network from PyTorch to ONNX by the following script:
from torch.autograd import Variable
import torch.onnx
import torchvision
import torch
dummy_input = Variable(torch.randn(1, 3, 256, 256))
model = torch.hub.load('facebookresearch/detr', 'detr_resnet50', pretrained=True)
torch.onnx.export(model, dummy_input, "detr_50.onnx", opset_version=11, verbose=True, input_names=['image'])
After I tried to load the converted network by using ONNX frontend and got crash here:
This is in file:src/relay/op/dyn/tensor/transform.cc
As you can see on the screen the crash is happen because we have dynamic shape in newshape->shape[0]
.
How can I fix it? Or maybe I should prepare the model in another way?