RCF-pytorch
RCF-pytorch copied to clipboard
函数cross_entropy_loss_RCF有疑问
对交叉熵两项加权,你用的是torch.nn.functional..binary_cross_entropy(input, target, weight=None, size_average=None, reduce=None, reduction='mean'),但是其中参数weight是对batch加权的,不是对交叉项加权。不知道我的理解是否正确。 参见pytorch文档 https://pytorch.org/docs/stable/nn.html?highlight=torch%20nn%20functional%20binary#torch.nn.BCELoss
pytorch中 binary_cross_entropy 和 torch.nn.BCELoss 这两者不同
@YFZh 在计算的时候,图片中的每个像素点也可以看作一个batch
@luowy1001 See BCELoss for details.
@CNHNLP好像不是这么理解吧