For me this worked:
rz = float(3.)
lossT3 = loss.item() * 3.5
lossT3p = loss.tolist()
print(type(lossT3), type(lossT3p))
See Daniel Voigt Godoy, 2024, DL with Pytorch volume I, page 102