Skip to content
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

[BUGs] Code that used to train OSCD #24

Open
pvmilk opened this issue Apr 17, 2024 · 0 comments
Open

[BUGs] Code that used to train OSCD #24

pvmilk opened this issue Apr 17, 2024 · 0 comments

Comments

@pvmilk
Copy link

pvmilk commented Apr 17, 2024

I believed that backbone from "random" and "pretrained" resnet model still have fully-connected layer in the last layer.
While the one from "pretrained" does not.

if args.backbone_type == 'random':
backbone = resnet.resnet18(pretrained=False)
elif args.backbone_type == 'imagenet':
backbone = resnet.resnet18(pretrained=True)
elif args.backbone_type == 'pretrain':
model = MocoV2.load_from_checkpoint(args.ckpt_path)
backbone = deepcopy(model.encoder_q)
else:

# remove fc layer
self.encoder_q = nn.Sequential(*list(self.encoder_q.children())[:-1], nn.Flatten())
self.encoder_k = nn.Sequential(*list(self.encoder_k.children())[:-1], nn.Flatten())

I also believed that this could affect the report result in the paper, and the comparison might not be fair.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant