RuntimeError: mean(): input dtype should be either floating point or complex dtypes. Got Long instea
问题描述在pytorch中创建的张量,求均值的时候报错RuntimeError: mean(): input dtype should be either floating point or complex dtypes. Got Long instead.解决办法将原代码的torch.tensor改成torch.Tensor结束