junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

The ONNX network's output '625' dimensions should be non-negative #1469

Closed youjin-c closed 2 years ago

youjin-c commented 2 years ago

Hello,

I am trying to convert a cyclegan model to onnx. I referred this answer for onnx importing, and it worked without errors. But the thing is, when I try to import the onnx file to the onnx runtime(Snap Lens Studio), I got this error below Resource import for /Users/youjin/Downloads/latest_net_G (1).onnx failed: The ONNX network's output '625' dimensions should be non-negative image When I see the structure of the model, the '625' is the output node, and the dimension is unknown, which is considered as '-1'.

I wonder where I can find the output node and if anyone has an idea to set it to the right dimension.

youjin-c commented 2 years ago

It was the issue that Snap Lens Studio could only import compressed GANs. I could solve it by training with the Snap-released GAN repo.