ACFNet
ACFNet copied to clipboard
ACFNet: Attentional Class Feature Network for Semantic Segmentation.(ICCV2019)
Fix bug mentioned in issue #7
Line 59&60 in loss/criterion.py `pred = preds[0] + preds[1]` `loss4 = lovasz_softmax(F.softmax(pred, dim=1), target, ignore=self.ignore_index)` 这里的 `pred` 没有做upsample, 然后直接给了lovasz_softmax, 而 `target` 是原图的size大小,这样会造成 pred 与 target 的size 不匹配。
`# multiply & normalize ->(B, N, C')` `energy = torch.bmm(proj_query, proj_key)` `energy_new = torch.max(energy, -1, keepdim=True)[0].expand_as(energy) - energy` I think the normalization implemented in acfnet.py is different from the equation...
when i use acf module in unet, the train loss will be nan  