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

Why is local feature (lf) different in training phase and test phase? #55

Open
anonymoussss opened this issue Jul 26, 2022 · 0 comments

Comments

@anonymoussss
Copy link

Hi~,
I notice that local feature (lf) variable is different in training phase and test phase. Specifically, in "AlignedReID/models/ResNet.py",

if not self.training:
            lf = self.horizon_pool(x)
        if self.aligned and self.training:
            lf = self.bn(x)
            lf = self.relu(lf)
            lf = self.horizon_pool(lf)
            lf = self.conv1(lf)
        if self.aligned or not self.training:
            lf = lf.view(lf.size()[0:3])
            lf = lf / torch.pow(lf,2).sum(dim=1, keepdim=True).clamp(min=1e-12).sqrt()

when training, 'lf' is 'self.horizon_pool+self.conv1', but during test, 'lf' is only 'self.horizon_pool'. Wouldn't this mismatch between the training phase and the testing phase make the results worse?

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