-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-penalization loss #9
Comments
@hankyul2 Did you tried by changing it to top_prob_td? |
@shreejalt |
@hankyul2 Actually in the paper they have mentioned that the pseudo labels should be the output from the baseline model such as DANN in the load_net function? |
@shreejalt For your information, I did not use this source code, but reimplemented version, which can be reason for not converging model issue. |
@hankyul2 Let me try with the changes I made and will let you know? |
@shreejalt To use pretrained weights, use code below. (I write it on phone, sorry for skipping details) from torch import nn
from torchvision import models
class MyModel(nn.Module):
def __init__(self):
super().__init__()
self.backbone = models.resnet50()
self.backbone.fc = nn.Identity()
self.bottleneck = nn.Sequential( nn.Linear(2048, 256), nn.BatchNorm1d(256), nn.Tanh(), nn.Dropout(0.1) )
self.fc = nn.Linear(2048, 31)
def forward(self, x):
return self.fc(self.bottleneck(self.backbone(x))) |
@hankyul2 You used DANN model from your repo itself? a Also did you tried by suing pretrained ImageNet weights? of the feature extractor? |
Yes
Yes But difference from this repo is that I could not apply self attention that drop accuracy, which is because of my wrong implementation. |
@hankyul2 I am getting 4-5% accuracy on the target data. Were you getting this much less accuracy or did you changed anything in this repo? My FixMix loss of TDM is not decreasing at all. But my accuracy of SDM is increasing gradually after the epochs. Also I haven’t changed anything in the code and I run directly using the command they have given. |
Yes I remove self-penalization loss. And did you try with my weight?
I could not answer about it, because I did not try to run this repo. |
@hankyul2 In your repo? |
@shreejalt |
Hi @hankyul2 @shreejalt As @hankyul2 mentioned, Basically, FixBi needs to load pre-trained baseline such as DANN, MSTN. Actually, I've never experienced divergence issues when training FixBi with the settings I've published. I hope my answer is helpful. |
Hi, thank you for sharing work!
I am a bit confusing about why
top_prob_sd
is used instead oftop_prob_td
in below code.FixBi/trainer/fixbi_trainer.py
Line 67 in 3c98694
Thank you!
The text was updated successfully, but these errors were encountered: