tensorwatch icon indicating copy to clipboard operation
tensorwatch copied to clipboard

Failed to export an ONNX attribute, since it's not constant, please try to make things (e.g., kernel size) static if possible

Open dayekuaipao opened this issue 5 years ago • 4 comments

So it only supports the model in torchvision,not my own?

dayekuaipao avatar Jun 17 '19 09:06 dayekuaipao

I am also facing this issue with custom model. So you are telling it does not support custom models. Because i tried on pre-trained squeezenet and it worked well for me.

puru-d avatar Jun 21 '19 09:06 puru-d

We support any model. If you had like to investigate this issue then please add detailed steps that would allow us to reproduce the issue. Include what you are doing, what is your model etc.

sytelus avatar Jul 10 '19 15:07 sytelus

Hi, I meet some problem using torchvision

model = torchvision.models.segmentation.deeplabv3_resnet101(pretrained=True)
model.eval()
trace, _ =  torch.jit.get_trace_graph(model, torch.randn(1, 3, 224, 224))
torch.onnx._optimize_trace(trace, torch.onnx.OperatorExportTypes.ONNX)

Could you please give some hits to save this problem?

Max-ChenFei avatar Jul 18 '19 15:07 Max-ChenFei

Facing the same issue with torchvision mobilenet. The issue is in onnx._optimize_trace

is there a solution for this? resnet_50 and googlenet worked fine, some networks have this issue

sruthikesh-MU avatar Aug 02 '19 18:08 sruthikesh-MU