Nnabla-rl

Latest version: v0.15.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.9.0

We are happy to announce the release of **nnablaRL**, a deep reinforcement learning (RL) library built on top of [nnabla](https://nnabla.org/).
Reinforcement learning is one of the cutting edge machine learning technology that [achieves super human performance](https://www.nature.com/articles/nature16961) in the field of gaming, robotics, etc..
We hope that this new library, **nnablaRL**, helps RL experts and also non-RL experts using reinforcement learning algorithms easily among our nnabla ecosystem.

Features of nnablaRL is the following.

**Friendly API**

nnablaRL has friendly Python APIs which enables to start training with only 3 lines of python code.

py
import nnabla_rl
import nnabla_rl.algorithms as A
from nnabla_rl.utils.reproductions import build_atari_env

env = build_atari_env("BreakoutNoFrameskip-v4") 1
dqn = A.DQN(env) 2
dqn.train(env) 3


You can also customize the algorithm's hyper parameters easily. For example, you can change the batch size of training data as follows.

python
import nnabla_rl
import nnabla_rl.algorithms as A
from nnabla_rl.utils.reproductions import build_atari_env

env = build_atari_env("BreakoutNoFrameskip-v4")
config = A.DQNConfig(batch_size=100)
dqn = A.DQN(env, config=config)
dqn.train(env)


In addition to algorithm hyper parameters, you can also flexibly change the training component such as neural network models and model solvers. For details, see [sample codes](https://github.com/sony/nnabla-rl/tree/master/examples) and [API documents](https://nnabla-rl.readthedocs.io).

**Many builtin algorithms**

Most of famous/SoTA deep reinforcement learning algorithms, such as DQN, SAC, BCQ, GAIL, etc., is already implemented in nnablaRL. Implemented algorithms are carefully tested and evaluated. You can easily start training your agent using these verified implementations.
Please check the sample codes and document for detail usage of each algorithm.
You can find the list of implemented algorithms [here](https://github.com/sony/nnabla-rl/tree/master/nnabla_rl/algorithms/README.md).

**Seemless switching of online and offline training**

In reinforcement learning, there are two main training procedures, online and offline, to train the agent. Online training is a training procedure that executes both data collection and network update alternately. Conversely, offline training is a training procedure that updates the network using only existing data. With nnablaRL, you can switch these two training procedures seemlessly. For example, as shown below, you can easily train a robot's controller online using simulated environment and finetune it offline with real robot dataset.

py
import nnabla_rl
import nnabla_rl.algorithms as A


simulator = get_simulator() This is just an example. Assuming that simulator exists
dqn = A.DQN(simulator, config=config)
dqn.train_online(simulator)

real_data = get_real_data() This is also an example. Assuming that you have real robot data
dqn.train_offline(real_data)

Getting started

You can find both notebook style interactive demos and raw python scripts as a sample code to get started. If you are unfamiliar with reinforcement learning, we recommend trying the notebook as a starting point. You can immediately launch and start training through google colaboratory! Check the list of notebooks [here](https://github.com/sony/nnabla-rl#getting-started).

Development of nnablaRL has just started. We will continue adding new reinforcement learning algorithms and SoTA techniques to nnablaRL. Feedbacks, feature requests and contributions are welcome! Check the [contribution guide](https://github.com/sony/nnabla-rl/tree/master/CONTRIBUTING.md) for details.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.