MenghanXia / ReversibleHalftoning

The first approach to utilize CNN for image dithering, which is actually non-trivial. This formulation enables us to equip it with extra features, e.g. reversibility. [ICCV 2021]
Other
31 stars 7 forks source link

inference运行报错 #8

Open Salvin01 opened 2 hours ago

Salvin01 commented 2 hours ago

错误提示: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 commented 2 hours ago

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