sacmehta / EdgeNets

This repository contains the source code of our work on designing efficient CNNs for computer vision
MIT License
412 stars 82 forks source link

onnx model error #15

Closed kingvision closed 5 years ago

kingvision commented 5 years ago

Hi I got the follow error when i convert espnetv2 segment model to onnx. raise RuntimeError("Failed to export an ONNX attribute, " RuntimeError: Failed to export an ONNX attribute, since it's not constant, please try to make things (e.g., kernel size) static if possible

how i can fix it?

sacmehta commented 5 years ago

Which model are you looking for?

kingvision commented 5 years ago

I used my own data to train the espnetv2 segment model, and the conversion to the onnx model failed. I used the pytorch1.2 and onnx1.5 version. Can you tell me how you converted successfully? Which version of pytorch and onnx are you using? Thank you

sacmehta commented 5 years ago

You need to make everything static for onnx conversion. We are writing a wrapper that convert our models, but that wrapper won’t be available soon.