Skip to content

Commit 656de97

Browse files
Add ONNX export example for MultiInputPolicy (#2098)
* add example for MultiInputPolicy export to onnx * Update changelog --------- Co-authored-by: Antonin RAFFIN <[email protected]>
1 parent 55d6f18 commit 656de97

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/guide/export.rst

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ If you are using PyTorch 2.0+ and ONNX Opset 14+, you can easily export SB3 poli
100100
with th.no_grad():
101101
print(model.policy(th.as_tensor(observation), deterministic=True))
102102
103+
For exporting ``MultiInputPolicy``, please have a look at `GH#1873 <https://github.com/DLR-RM/stable-baselines3/issues/1873#issuecomment-2710776085>`_.
103104

104105
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.
105106

docs/misc/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Documentation:
4444
- Clarify the use of Gym wrappers with ``make_vec_env`` in the section on Vectorized Environments (@pstahlhofen)
4545
- Updated callback doc for ``EveryNTimesteps``
4646
- Added doc on how to set env attributes via ``VecEnv`` calls
47+
- Added ONNX export example for ``MultiInputPolicy`` (@darkopetrovic)
4748

4849

4950
Release 2.5.0 (2025-01-27)

0 commit comments

Comments
 (0)