[BUG] TransformedEnv.transform[0].init_stats cause exception
Open
@vmoens is already working on this.
Since Apr 25, 2023.
bug
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 487
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 207
Description
I'm using torch2.0, follow the reinforcement_ppo.py, on line:
env.transform[0].init_stats(num_iter=1, reduce_dim=0, cat_dim=0)
I got exception:
env.transform[0].init_stats(num_iter=1, reduce_dim=0, cat_dim=0)
File "D:\Working\pycharm_workspace\RL\torchrl\torchrl\envs\transforms\transforms.py", line 1747, in init_stats
loc = data.mean(reduce_dim, keepdim=True)
RuntimeError: mean(): could not infer output dtype. Input dtype must be either a floating point or complex dtype. Got: Short
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.