错误:
RuntimeError: _th_normal not supported on CPUType for Long
import torch
torch.normal(mean=0.5,std=torch.arange(1, 6))
解决方案:tensor的数据类型换一下。
import torch
torch.normal(mean=0.5,std=torch.arange(1, 6).float())
错误:
RuntimeError: _th_normal not supported on CPUType for Long
import torch
torch.normal(mean=0.5,std=torch.arange(1, 6))
解决方案:tensor的数据类型换一下。
import torch
torch.normal(mean=0.5,std=torch.arange(1, 6).float())