I don’t think so, below is the loss function and the calculation
def heteroscedastic_loss(true, mean, log_var):
    precision = torch.exp(-log_var)
    return torch.mean(torch.sum(precision * (true - mean) ** 2 + log_var, 1), 0)

...

loss = heteroscedastic_loss(y, mean, log_var) + regularization
loss.backward()

and I tried it on the cpu and everything works fine