BCEWithLogitsLoss报错RuntimeError: result type Float can't be cast to the desired output type Long

loss = F.binary_cross_entropy_with_logits(input, target)

input错写成了Long类型,target错写成了Int类型

input与target需要的是float类型

posted @ 2023-10-07 22:41  oneDonkey  阅读(352)  评论(0)    收藏  举报