Skip to content

sb3_to_onnx.py Script

This script converts a Stable Baselines3 model to an ONNX model for use in Unreal Engine.

Usage

Terminal window
usage: sb3_to_onnx [-h] [--model-path MODEL_PATH] [--output-path OUTPUT_PATH]

Optional Arguments

--model-path

Path to the Stable Baselines3 model to convert

  • Default: './ckpt/ppo_final.zip'
  • Type: str
  • Required: False

--output-path

Path where the ONNX model will be saved

  • Default: './ckpt/ppo_final/model.onnx'
  • Type: str
  • Required: False