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

Errors reported in this section of USING PRETRAINED MODELS #2081

Open
Zhaohhya opened this issue Apr 16, 2024 · 1 comment
Open

Errors reported in this section of USING PRETRAINED MODELS #2081

Zhaohhya opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Zhaohhya
Copy link

I found a problem in the section USING PRETRAINED MODELS, the author did not have an error because the data is running CPU the whole time, but if the model and R3M are placed on the GPU, because the r3M is placed on the cpu by default, when sampling,
r3M = ReplayBuffer(storage=storage, transform=r3m)
it will automatically transform the data, at this time the data is on the CPU, and the R3M is on the GPU, it will report an error

@Zhaohhya Zhaohhya added the enhancement New feature or request label Apr 16, 2024
@Zhaohhya Zhaohhya changed the title [Feature Request] Errors reported in this section of USING PRETRAINED MODELS Apr 16, 2024
@Zhaohhya
Copy link
Author

Here's how I modified it.
rb = ReplayBuffer(storage=storage, transform=r3m)modified to rb = ReplayBuffer(storage=storage)
Add

batch = rb.sample(32)
batch = batch.to(device)
transformed_batch = r3m(batch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants