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/Tensorflow Port #125

Closed
jacobf18 opened this issue Mar 7, 2023 · 3 comments · Fixed by #129
Closed

ONNX/Tensorflow Port #125

jacobf18 opened this issue Mar 7, 2023 · 3 comments · Fixed by #129

Comments

@jacobf18
Copy link
Collaborator

jacobf18 commented Mar 7, 2023

I just wanted to inform everybody that I was working on porting the PyTorch code to work with other deep-learning frameworks. I am doing this because PyTorch doesn't work well with other python packages for bundling into standalone programs. Also, PyTorch is large compared to other packages like ONNX when all we are doing is inference. The changes are minor and restricted to the network.py file.

We could make it an option for which framework to use if people have trouble installing PyTorch or want to run this package on a system that cannot run PyTorch.

@mscheltienne
Copy link
Member

That sounds like a great idea! I don't know ONNX, but I do like Tensorflow and Keras a lot :)
That might also make packaging simpler (or not?) especially when it comes to conda-forge.

@jacobf18
Copy link
Collaborator Author

jacobf18 commented Mar 7, 2023

ONNX is universal so it allows for porting to tensorflow/keras as well. From my initial tests, loading the ONNX runtime package is a lot faster than importing PyTorch.

@jacobf18
Copy link
Collaborator Author

Got it working on my laptop. Will format the code and push here soon. Also, if we wanted we could host the model using git LFS so that it wasn’t inside the repo. (It’s only 11 MB so this might not be necessary.) ONNX models can be loaded anywhere similar to PyTorch models with a onnx.load command (https://github.com/onnx/models)

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 a pull request may close this issue.

2 participants