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

Fix device for initial RHO-LOSS tensor #525

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

MaxiBoether
Copy link
Contributor

The initial tensor resides on CPU. For me, it failed when running RHO-LOSS, since the very first self.rho_loss = torch.cat([self.rho_loss, training_loss - irreducible_loss]).to(training_loss.dtype) was on two different devices, the CPU (initial tensor) and the GPU (training loss and IR loss). This PR fixes that by moving the initial tensor to the correct device.

@MaxiBoether MaxiBoether requested a review from XianzheMa June 19, 2024 09:42
Copy link
Collaborator

@XianzheMa XianzheMa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MaxiBoether MaxiBoether merged commit 29018c7 into main Jun 19, 2024
18 checks passed
@MaxiBoether MaxiBoether deleted the fix/MaxiBoether/rhodevice branch June 19, 2024 09:50
Copy link

Line Coverage: -% ( % to main)
Branch Coverage: -% ( % to main)

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.

2 participants