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

It's hard to train ShanghaiPartA dataset, I got the best MAE with 250, but the paper gives about 70? #90

Open
YuYue26 opened this issue Jul 2, 2021 · 1 comment

Comments

@YuYue26
Copy link

YuYue26 commented Jul 2, 2021

first:
I didn't change any parameters in this code:
args.original_lr = 1e-6
args.lr = 1e-7
args.batch_size = 1
args.momentum = 0.95 # 0.95
args.decay = 51e-4 # 51e-4
args.start_epoch = 0
args.epochs = 400
args.steps = [-1,1,100,150]
args.scales = [1,1,1,1]
args.workers = 4

second:
I train from the vgg16 weights, and the inital code did something wrong with python 3.7, so I changed it as followed:
self.frontend = make_layers(self.frontend_feat)
self.backend = make_layers(self.backend_feat,in_channels = 512,dilation = True)
self.output_layer = nn.Conv2d(64, 1, kernel_size=1)
if not load_weights:
mod = models.vgg16(pretrained = True)
bb_dict = mod.state_dict()
self._initialize_weights()
pretrained_dict = self.frontend.state_dict()
for keys, values in pretrained_dict.items():
pretrained_dict[keys] = bb_dict['features.'+ keys]

last:
the avg loss in the train can reach around 300, it had a long way from the best MAE, so how can I do to reach the best MAE in ShanghaiTech partA

@stupidoge
Copy link

same....

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

2 participants