Open Youngkl0726 opened 6 years ago
It is caused by difference of the version of pytorch . My pytorch version: 0.2.0_4 You can specific the param "dim" according to your version Moreover, here is a more simply version of FocalLoss:( https://github.com/ZijunDeng/pytorch-semantic-segmentation/blob/master/utils/misc.py)
logpt = F.log_softmax(input) # NHW,C UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.