Open Salvin01 opened 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值,但程序需要的是一个张量
File "C:\Users\22814\Desktop\ReversibleHalftoning-main\model\model.py", line 54, in forward noise = torch.randn_like(x[1]) * 0.3
错误提示: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值,但程序需要的是一个张量