waleedka / hiddenlayer

Neural network graphs and training metrics for PyTorch, Tensorflow, and Keras.
MIT License
1.79k stars 266 forks source link

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

Open Max-ChenFei opened 5 years ago

Max-ChenFei commented 5 years ago

Hi, I meet the problem using torchvision model = torchvision.models.segmentation.deeplabv3resnet101(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?

fmcarlucci commented 4 years ago

Same problem here, trying to visualize a model from https://github.com/JiaminRen/RandWireNN

cthnguyen commented 4 years ago

Hello I also faced the same issue, did you guys managed to solve it ?