RCF-pytorch icon indicating copy to clipboard operation
RCF-pytorch copied to clipboard

函数cross_entropy_loss_RCF有疑问

Open YFZh opened this issue 6 years ago • 4 comments

对交叉熵两项加权,你用的是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

YFZh avatar Mar 18 '19 11:03 YFZh

pytorch中 binary_cross_entropy 和 torch.nn.BCELoss 这两者不同

luowy1001 avatar Mar 31 '19 01:03 luowy1001

@YFZh 在计算的时候,图片中的每个像素点也可以看作一个batch

CNHNLP avatar May 16 '19 08:05 CNHNLP

@luowy1001 See BCELoss for details.

YFZh avatar May 23 '19 01:05 YFZh

@CNHNLP好像不是这么理解吧

YFZh avatar May 23 '19 01:05 YFZh