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

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

posted @ 2020-11-12 20:22  Xycdada  阅读(536)  评论(0编辑  收藏  举报