-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fully support from/to numpy/pytorch for Batch #62
Comments
Also, the use of torch.tensor must be prohibited to convert numpy array to torch tensor since it is less efficient and break memory sharing on cpu. |
For most of the scenarios, the agent's action contains only a few elements that could be considered as negligible. |
I'm not saying to use only torch.tensor, but convert them using |
@Trinkle23897 The PR should be ready right now. I try to do the minimal modifications to fully support Batch from/to numpy/pytorch. |
The current implementation of PPO and other policy algorithm do not support action dict because of this line.
It could be solved by adding to new method to
Batch
class to convert back the relevant fields to torch.Tensor.I'm opening a PR to fix that.
The text was updated successfully, but these errors were encountered: