ReversibleHalftoning icon indicating copy to clipboard operation
ReversibleHalftoning copied to clipboard

inference运行报错

Open Salvin01 opened this issue 1 year ago • 1 comments

错误提示:randn_like() received an invalid combination of arguments - got (bool), but expected one of: * (Tensor input, torch.dtype dtype, torch.layout layout, torch.device device, bool requires_grad) 这是为什么呀 生成随机高斯噪声时,x[1]是一个bool值,但程序需要的是一个张量

Salvin01 avatar Nov 25 '24 12:11 Salvin01

File "C:\Users\22814\Desktop\ReversibleHalftoning-main\model\model.py", line 54, in forward noise = torch.randn_like(x[1]) * 0.3

Salvin01 avatar Nov 25 '24 12:11 Salvin01