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

training is good, eval is worse #2

Open
ailias opened this issue Sep 20, 2018 · 7 comments
Open

training is good, eval is worse #2

ailias opened this issue Sep 20, 2018 · 7 comments

Comments

@ailias
Copy link

ailias commented Sep 20, 2018

When I trained hg model using 300w datasets, and the training result showed is good, but is worse when I use eval mode. Maybe it's because of the bn layer. Have you met this problem? What should I do for it?

@raymon-tian
Copy link
Owner

@ailias No, I didn't meet the problem. Did you set net.eval() before evaluation?

@thruster1996
Copy link

@ailias ,I meet the same problem just like you. After finishing training, if I set the net to eval, then output of the net seems to be much more worse than the train mode:(

@TingmanYan
Copy link

I have met the same problem when training the hg model on MPII dataset.
I'm training on a Titan Xp GPU, Pytorch 0.4.1.
Changing hg.py, line 22-23

self.res2 = Residual(128, 128)
self.res3 = Residual(128, self._nFeats)

to

self.res2 = Residual(128, self._nFeats)
self.res3 = Residual(self._nFeats, self._nFeats)

solved my problem.
Hope it will help you too.

@4Statistics
Copy link

When I trained hg model using 300w datasets, and the training result showed is good, but is worse when I use eval mode. Maybe it's because of the bn layer. Have you met this problem? What should I do for it?

Can you tell me how to run the code ?
python train.py

Traceback (most recent call last):
File "train.py", line 123, in
net = KFSGNet()

TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expected one of:

  • (torch.device device)
  • (torch.Storage storage)
  • (Tensor other)
  • (tuple of ints size, torch.device device)
  • (object data, torch.device device)

Thank you very much .
Best wishes.

@silvercherry
Copy link

请问能将训练集分享出来吗

@silvercherry
Copy link

When I trained hg model using 300w datasets, and the training result showed is good, but is worse when I use eval mode. Maybe it's because of the bn layer. Have you met this problem? What should I do for it?

Can you tell me how to run the code ?

python train.py
Traceback (most recent call last):
File "train.py", line 123, in
net = KFSGNet()

TypeError: new() received an invalid combination of arguments - got (float, int, int, int), but expected one of:

  • (torch.device device)
  • (torch.Storage storage)
  • (Tensor other)
  • (tuple of ints size, torch.device device)
  • (object data, torch.device device)

Thank you very much .
Best wishes.

have you solve this problem?

@ilaij0810
Copy link

in models.py, from line 64, should be modified:
nn.Conv2d(ins,int(outs//2),1),
nn.BatchNorm2d(int(outs//2)),
nn.ReLU(inplace=True),
nn.Conv2d(int(outs//2),int(outs//2),3,1,1),
nn.BatchNorm2d(int(outs//2)),
nn.ReLU(inplace=True),
nn.Conv2d(int(outs//2),outs,1)

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

7 participants