Hello! I have this line of code:
error_threshold = rmse_loss(torch.log(model(factors)), product)
where model is trained to predict exp(product) given factors. model, factors and product are all on CUDA. However, when I run the code I get this error:
RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.FloatTensor for argument #3 'other'
Can someone tell me what this mean? What is argument number 3? The definition of rmse_loss is this:
def rmse_loss(pred, targ):
    denom = targ**2
    denom = torch.sqrt(denom.sum()/len(denom))
    return torch.sqrt(F.mse_loss(pred, targ))/denom

The NN used for the model is this:
class SimpleNet(nn.Module):
    def __init__(self, ni):
        super().__init__()
        self.linear1 = nn.Linear(ni, 128)
        self.linear2 = nn.Linear(128, 128)
        self.linear3 = nn.Linear(128, 128)
        self.linear4 = nn.Linear(128, 64)
        self.linear5 = nn.Linear(64,64)
        self.linear6 = nn.Linear(64,64)
        self.linear7 = nn.Linear(64,1)

    def forward(self, x):
        x = F.softplus(self.linear1(x))
        x = F.softplus(self.linear2(x))
        x = F.softplus(self.linear3(x))
        x = F.softplus(self.linear4(x))
        x = F.softplus(self.linear5(x))
        x = F.softplus(self.linear6(x))
        x = self.linear7(x)
        return x

Thank you!