Open cjenkins5614 opened 2 years ago
Hello @cjenkins5614. I have the same problem. Did you fix it ? UPD: Fixed it.
How did it work out in your case? @RostyslavBryiovskyi
I haven't figured it out yet.
This is the bug of onnx. The Upsample layer cannot be placed in front of the BN/IN. https://github.com/pytorch/pytorch/issues/69346. Try to insert an conv2d layer with identity kernel as a warkaround.
@zhangmozhe I'm not sure how to utilize identity matrices. I tried using torch.Identity and torch.Conv2d, but ONNX ignores those layers. As before, the channel size is *.
I got the same problem here, can anyone clearly show an example how to export onnx successfully?
I met the same problem. Can anyone post a solution for this problem?
me too
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. I removed allspectral_norm
calls, as well as trying to change synced batch norm to batch norm, but the issue still persists.