rl
rl copied to clipboard
A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.
## Describe the bug When you get a tensordict rollout of shape `(N_envs, N_steps, C, H, W)` out of a collector and you want to apply an advantage module that...
## Description Adding a torchdict and torch rl version of the PyTorch example reinforcement_q_learning.py ## Motivation and Context Adds a simpler DQN example - [ ] I have raised an...
## Description Allows to reset the parameters in the loss module.
## Description followup from this [pull request](https://github.com/pytorch/rl/pull/1892) copy past: We project on using https://github.com/Tensorclass to represent losses. The advantage of tensorclass for losses instead of tensordict is that it will...
```python from torchrl.modules import LSTM import torch from torch.utils.benchmark import Timer from torchrl.modules.tensordict_module.rnn import _get_num_per_traj_init, _split_and_pad_sequence b = 10 t = 100 c = 32 device = "cuda" with torch.device(device):...
## Describe the bug If the metric one is trying to log with the csv logger has `/` in its name, you will get a `No such file or directory`...
## Motivation In the original MAPPO paper, the authors claim an RNN-based actor beats the standard MLP actor, however torchRL currently has no recurrent multi-agent networks. Also suggested here by...
## Motivation Currently we must instantiate an instance of the environment we wish to solve before creating a `MultiSyncDataCollector` object. This is because we can't create a policy without knowing...