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

fixed bug in initializing ValueNorm #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nikunj-Gupta
Copy link

@Nikunj-Gupta Nikunj-Gupta commented Apr 17, 2024

self.value_normalizer = ValueNorm(1).to(self.device) --> self.value_normalizer = ValueNorm(1, device=self.device)

in onpolicy/algorithms/r_mappo/r_mappo.py (line 48).

Running into the following error otherwise:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and CPU 

Was running into the following error with the previous version: "RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and CPU!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant