Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX Model #316

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

ONNX Model #316

wants to merge 6 commits into from

Conversation

OPHoperHPO
Copy link

Changelog:

  1. Added a custom FourierUnitJIT class, exportable using the torch.onnx.export converter (should give identical results to the original torch implementation).
  2. Added information about the ONNX model in the README.
  3. Added a Colab notebook for exporting the model to ONNX.

How to activate FourierUnitJIT:

You need to add the use_jit boolean config field in config.yaml under generator/resnet_conv_kwargs, like this: config.generator.resnet_conv_kwargs.use_jit = True.

It is turned off by default and should be compatible with the original code.

The logic of Fourier transformation has been implemented from scratch without using complex numbers - the differences in results compared to the torch version are around thousandths of a percent. The code is intended for research purposes only, and the accuracy of the results is not guaranteed.

This version can be exported using torch.onnx.export
@OPHoperHPO OPHoperHPO mentioned this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant