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

Possible to support loading and introspecting via ONNX.js? #12

Closed
EricCousineau-TRI opened this issue May 9, 2020 · 2 comments
Closed

Comments

@EricCousineau-TRI
Copy link

Relates #2 and #8:
Might it be possible to support loading / introspecting (a subset of) models loaded via ONNX.js?
https://github.com/Microsoft/onnxjs

Curious because we would like to visualize our own PyTorch model / networks.

I'm assuming that this may be closed as out-of-scope, which is totally fine! Just wanna put it out there ;)

@EricCousineau-TRI
Copy link
Author

EricCousineau-TRI commented May 9, 2020

An add'l link regarding PyTorch <-> TensorFlow via ONNX, on top of the links provided via #8 (comment)
https://medium.com/@santhoshkolloju/convert-your-pytorch-models-to-tensorflow-with-onnx-84c3bdd8d722

@xiaohk
Copy link
Member

xiaohk commented May 11, 2020

Hey, thanks for you suggestion!

Yeah we have considered onnx.js vs tensorflow.js when we started the project. From our experience, tensorflow.js was more straightforward at that time.

It is definitely possible to support loading models with onnx.js. In cnn-tf.js we converted the loaded model into a JavaScript array of objects, and all visualization code are using this array. Therefore, after constructing this array using onnx.js all other code should work as well :)

However, it might be a little bit tricky to modify the CNN Explainer code to inspect your model (assuming not tiny-vgg 😅) out of the box, as the visualization layout is especially designed for tiny-vgg in the current version.

I will close this issue for now, let me know if you have more questions :)

@xiaohk xiaohk closed this as completed May 11, 2020
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

No branches or pull requests

2 participants