You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this line can be replaced by:
if torch.cuda.is_available():
one_hot = torch.cuda.FloatTensor(*x.shape, dims).zero_()
else:
one_hot = torch.FloatTensor(*x.shape, dims).zero_().to(device)
As a result, the cpu usage can be reduced, leading to faster training.
The text was updated successfully, but these errors were encountered:
https://github.com/molecule-one/megan/blob/master/src/model/megan.py#L19
I think this line can be replaced by:
if torch.cuda.is_available():
one_hot = torch.cuda.FloatTensor(*x.shape, dims).zero_()
else:
one_hot = torch.FloatTensor(*x.shape, dims).zero_().to(device)
As a result, the cpu usage can be reduced, leading to faster training.
The text was updated successfully, but these errors were encountered: