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

Added ONNX RNN example #227

Merged
merged 3 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ Additional environment supported properties and functions

1.6.0

* Added ONNX export colab example.
* Added ONNX export colab example for discrete and continious action spaces. For continuous case RNN example is provided as well.
* Improved RNNs training in continuous space, added option `zero_rnn_on_done`.
* Added NVIDIA CuLE support: https://github.com/NVlabs/cule
* Added player config everride. Vecenv is used for inference.
* Fixed multi-gpu training with central value.
* Fixed max_frames termination condition, and it's interaction with the linear learning rate: https://github.com/Denys88/rl_games/issues/212
* Fixed "deterministic" misspelling issue.
* Fixed Mujoco and Brax SAC configs.
* Fixed multiagent envs statistics reporting. Fixed Starcraft2 SMAC environments.

1.5.2

Expand Down
77 changes: 31 additions & 46 deletions notebooks/train_and_export_onnx_example_continuous.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "yE40EhNFVszf",
"metadata": {
"id": "yE40EhNFVszf"
},
"outputs": [],
"source": [
"from rl_games.torch_runner import Runner\n",
"import os\n",
Expand All @@ -41,13 +47,7 @@
"import onnx\n",
"import onnxruntime as ort\n",
"%matplotlib inline"
],
"metadata": {
"id": "yE40EhNFVszf"
},
"id": "yE40EhNFVszf",
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
Expand All @@ -63,27 +63,27 @@
},
{
"cell_type": "code",
"source": [
"%load_ext tensorboard"
],
"execution_count": null,
"id": "2enRAdp8WrJV",
"metadata": {
"id": "2enRAdp8WrJV"
},
"id": "2enRAdp8WrJV",
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"%load_ext tensorboard"
]
},
{
"cell_type": "code",
"source": [
"%tensorboard --logdir 'runs/'"
],
"execution_count": null,
"id": "JGE4eeUCWsss",
"metadata": {
"id": "JGE4eeUCWsss"
},
"id": "JGE4eeUCWsss",
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"%tensorboard --logdir 'runs/'"
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -284,31 +284,15 @@
"print(total_reward, num_steps)\n",
"ipythondisplay.clear_output(wait=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2ae5a74c",
"metadata": {
"id": "2ae5a74c"
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "0b5cb601",
"metadata": {
"id": "0b5cb601"
},
"outputs": [],
"source": []
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "warp39",
"language": "python",
"name": "python3"
},
Expand All @@ -322,13 +306,14 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
},
"colab": {
"provenance": []
"version": "3.9.13"
},
"accelerator": "GPU"
"vscode": {
"interpreter": {
"hash": "20dffcfa027a5ca97c32e660f6348a5dd89a4a8771672beb12fd55712d57511e"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
563 changes: 563 additions & 0 deletions notebooks/train_and_export_onnx_rnn_example_continuous.ipynb

Large diffs are not rendered by default.