Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Update loss.py #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def rand_between(low, high, normal=False):
if normal:
return torch.randn(1) * (high - low) + low
else:
return torch.rand(1) * (high - low) + low
return torch.rand(1, device=torch.device('cuda:0')) * (high - low) + low

def get_target_tensor(self, prediction, target_is_real):
"""Create label tensors with the same size as the input.
Expand Down