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

Add ONNX export example for MultiInputPolicy #2098

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/guide/export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ If you are using PyTorch 2.0+ and ONNX Opset 14+, you can easily export SB3 poli
with th.no_grad():
print(model.policy(th.as_tensor(observation), deterministic=True))

For exporting ``MultiInputPolicy``, please have a look at `GH#1873 <https://github.com/DLR-RM/stable-baselines3/issues/1873#issuecomment-2710776085>`_.

For SAC the procedure is similar. The example shown only exports the actor network as the actor is sufficient to roll out the trained policies.

Expand Down
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Documentation:
- Clarify the use of Gym wrappers with ``make_vec_env`` in the section on Vectorized Environments (@pstahlhofen)
- Updated callback doc for ``EveryNTimesteps``
- Added doc on how to set env attributes via ``VecEnv`` calls
- Added ONNX export example for ``MultiInputPolicy`` (@darkopetrovic)


Release 2.5.0 (2025-01-27)
Expand Down