Open cjenkins5614 opened 3 years ago
Hi , did you find any solution now?
Not sure that this solution is right, I downgraded torch to 1.7 and then model converted to onnx. Looks like some bug on torch to onnx conversion side that upsample in new versions to produce dynamic shapes which lead to error for batch norms
Hello,
Thanks for the great work. I'm trying to convert this model into onnx, but have met a few issues.
The
mv
anddot
operator used by PyTorch'sspectral_norm
was one of them. Following https://github.com/onnx/onnx/issues/3006#issuecomment-690303884 I coverted them tomatmul
in my own implementation ofspectral_norm
and the issue went away.Now it's complaining:
The code to convert this is:
I printed out the graph
g
from https://github.com/pytorch/pytorch/blob/e56d3b023818f54553f2dc5d30b6b7aaf6b6a325/torch/onnx/symbolic_opset9.py#L1337Float(*, *, *, *
stood out to me but I'm not sure how to interpret this.