Add tensorflow.js export example#2190
Merged
araffin merged 6 commits intoDLR-RM:masterfrom Nov 14, 2025
Merged
Conversation
…ntributing and update changelog
araffin
reviewed
Nov 13, 2025
araffin
reviewed
Nov 13, 2025
docs/guide/export.rst
Outdated
| ------------------------------------ | ||
|
|
||
| See https://onnxruntime.ai/docs/tutorials/web/build-web-app.html | ||
| Full example code: https://github.com/JonathanColetti/CarDodgingGym and demo: https://jonathancoletti.github.io/CarDodgingGym/ |
Member
There was a problem hiding this comment.
Please keep the link to the official doc too
araffin
reviewed
Nov 13, 2025
docs/guide/export.rst
Outdated
|
|
||
| The following is a simple example that showcases the full conversion + inference | ||
|
|
||
| .. code-block:: python |
Member
There was a problem hiding this comment.
maybe just refer to the code above and say that the opset need to be changed
Contributor
Author
|
@araffin thanks for the input. I made the changes! let me know if anything is wrong or I misinterpreted something |
contributing.md setup more robust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
closes #2189
I added detailed documentation for setup and inference in tensorflow.js along with clear explanations on each design choice
I added versioning pinning in the ONNX for better reproduceability along with an extra comment stating you can renormalize or unnormalize
I added an example project of mine in the export to ONNX-JS documentation. I can remove if unneeded but I thought it would add depth with a real world example
The command in
pip install -e .[docs,tests,extra]fails on zsh due tozsh: no matches found: .[docs,tests,extra]thus it was changed topip install -e '.[docs,tests,extra]'Motivation and Context
Types of changes
Checklist
make format(required)make check-codestyleandmake lint(required)make pytestandmake typeboth pass. (required)make doc(required)Note: You can run most of the checks using
make commit-checks.Note: we are using a maximum length of 127 characters per line