pytorch-CycleGAN-and-pix2pix
pytorch-CycleGAN-and-pix2pix copied to clipboard
How to convert trained CycleGAN model to ONNX, eventually coreML model
Thank's to you, I've achieved my goal through your cycleGAN model.
I hope to convert cycleGAN model to ONNX model, eventually coreML model.
On your code, which file should I try convert?
And any advice how to do it?
Once again, I'm really thanks to you!
Hi HeoJinLareine,
We tried to convert the CycleGAN model to ONNX but we got some problems:
First: TestModel object has no attribute ‘state_dict’
After changing the net into this attribute, we got: “forward() got an unexpected keyword argument: ‘keep_vars’” This seems to be a generic function call to neural networks, so it is a bit fuzzy to me which of the actual implementations is really called there (I would assume TestModel). However, I added this argument to all of those function definitions, but still get this error.
Did you try to do this? If so, can you share your solution?
Best regards, César Coelho
Hi! I'm seeking to convert this model to ONNX too. I wouldn't even know where to start though.
I as well!
+1
+1
I am getting error as below
RuntimeError: Unsupported: ONNX export of batch_norm for unknown channel size.
+1
+1
You can fix this error by compiling and installing PyTorch yourself