cavalleria / cavaface

face recognition training project(pytorch)
MIT License
456 stars 88 forks source link

Error when using alternative head functions #3

Closed xsacha closed 4 years ago

xsacha commented 4 years ago

When changing ArcFace to: ArcNegFace, CurriculumFace (didn't try others), I get this:

  File "/home/imagus/.local/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 932, in forward
    ignore_index=self.ignore_index, reduction=self.reduction)
  File "/home/imagus/.local/lib/python3.6/site-packages/torch/nn/functional.py", line 2317, in cross_entropy
    return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
  File "/home/imagus/.local/lib/python3.6/site-packages/torch/nn/functional.py", line 1535, in log_softmax
    ret = input.log_softmax(dim)
AttributeError: 'tuple' object has no attribute 'log_softmax'

Pytorch: 1.5.0 (could be issue with this?)

cavalleria commented 4 years ago

the bug has been fixed