Spaces:
Runtime error
Runtime error
File size: 338 Bytes
3f42bd3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import torch
def make_cuda(tensor):
"""Use CUDA if it's available."""
if torch.cuda.is_available():
tensor = tensor.cuda()
return tensor
def is_minimum(value, indiv_to_rmse):
if len(indiv_to_rmse) == 0:
return True
temp = list(indiv_to_rmse.values())
return True if value < min(temp) else False |