face.evoLVe
face.evoLVe copied to clipboard
Why the training prec@1/5 is always 0.00000?
When I run the train.py using the MS1M as training dataset, the Training Prec@1 and Training Prec@5 are always 0.000000. Could anyone tell me why?
your training loss is too large, continue training
did u have solved ?? @sstzal
I have the same problem with you even though my loss around 17 after epoch 20th @@
did u have solved ?? @sstzal
Yes, i have solved the problem. Just wait, and the training loss will fall.
in order to your pre # 0. how many for epoch and loss ?? @sstzal
in order to your pre # 0. how many for epoch and loss ?? @sstzal
After about two epoches, the Training Prec@1 and Training Prec@5 will grow slowly. However, I have noticed that you have the problem even after epoch 20th, I think you maybe have some mistakes in your code.
although my Prec@1,5 is always 0.0000 but Evaluation is 0.7xxxx @@... and Is 6k imgs (100MB) data train not enough ??. hence, my prec@1,5 is always 0.000xx although in 40th epoch @@
@NHDat2 if you train with arcface, you should change the hyperparameter m and s.
I also have this question, and I have already trained 21 epochs. However, the performance on validation set become better and better ... I use the same dataset which the readme.md mentioned.
arcface loss? 892379162 邮箱:[email protected] 签名由 网易邮箱大师 定制 On 04/10/2020 10:15, zhangxilun wrote: I also have this question, and I have already trained 21 epochs. However, the performance on validation set become better and better ... I use the same dataset which the readme.md mentioned. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Yes, I use arcface loss. Another key point I need to mention is that I change the embedding size from recommended 512 to 256, because I'd like to use the algorithm in my own mobile device. Maybe the 256-d tensor doesn't have enough feature to represent the differences between different persons?
the hyperparameters m and s should be changed. you can set m=45 s=0.3,train one epoch. if it's ok,the top acc will not always zero. ------------------ 原始邮件 ------------------ 发件人: "zhangxilun"[email protected] 发送时间: 2020年4月13日(星期一) 上午10:56 收件人: "ZhaoJ9014/face.evoLVe.PyTorch"[email protected]; 抄送: "reverseSystem"[email protected];"Comment"[email protected]; 主题: Re: [ZhaoJ9014/face.evoLVe.PyTorch] Why the training prec@1/5 isalways 0.00000? (#93)
Yes, I use arcface loss. Another key point I need to mention is that I change the embedding size from recommended 512 to 256, because I'd like to use the algorithm in my own mobile device. Maybe the 256-d tensor doesn't have enough feature to represent the differences between different persons?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I had the same issue. I have researched the issue and found that with cross entropy loss the precision do improved. Changing of focal.py from:
class FocalLoss(nn.Module):
def __init__(self, gamma = 2, eps = 1e-7):
super(FocalLoss, self).__init__()
self.gamma = gamma
self.eps = eps
self.ce = nn.CrossEntropyLoss()
def forward(self, input, target):
logp = self.ce(input, target)
p = torch.exp(-logp)
loss = (1 - p) ** self.gamma * logp
return loss.mean()
to:
class FocalLoss(nn.Module):
def __init__(self, gamma = 2, eps = 1e-7):
super(FocalLoss, self).__init__()
self.gamma = gamma
self.eps = eps
self.ce = nn.CrossEntropyLoss(reduction='none')
def forward(self, input, target):
logp = self.ce(input, target)
p = torch.exp(-logp)
loss = (1 - p) ** self.gamma * logp
return loss.mean()
have resolved (at least, for me) the issue, and now the precision is improved also with FocallLoss
@ReverseSystem001 Can you show me where the hyperparameters m and s?
I have the same issue and don't have enough GPU. I trained on google colab and had to reduce the number of images from the dataset (train on casia-maxpy-clean dataset with 401 image folder).
Top1 and Top5 doesn't change after 29 epoches.
has anyone a solution for this problem?