python 报错:reduce failed to synchronize: device-side assert triggered

 使用torch.nn.BCELoss()需要input >= 0. && input <= 1,但是我的网络最后没有加sigmoid,用nn.BCEWithLogitsLoss()替换torch.nn.BCELoss()即可。

原文地址:https://www.cnblogs.com/Xycdada/p/13966064.html