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

no relu before the global pool? #14

Open
hengck23 opened this issue Feb 14, 2023 · 0 comments
Open

no relu before the global pool? #14

hengck23 opened this issue Feb 14, 2023 · 0 comments

Comments

@hengck23
Copy link

in the classification model of nextvit.py:

why is there no relu before the global pool?
the batchnorm will produce both +ve and -ve values.



    def forward(self, x):
        x = self.stem(x)
        for idx, layer in enumerate(self.features):
            if self.use_checkpoint:
                x = checkpoint.checkpoint(layer, x)
            else:
                x = layer(x)
        x = self.norm(x)
        x = self.avgpool(x)
        x = torch.flatten(x, 1)
        x = self.proj_head(x)
        return x


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