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

Hierarchical parameter of custom models' forward method #91

Open
jan-fathomx opened this issue Nov 12, 2024 · 0 comments
Open

Hierarchical parameter of custom models' forward method #91

jan-fathomx opened this issue Nov 12, 2024 · 0 comments

Comments

@jan-fathomx
Copy link

Hi! I have a question about the custom forward method for models, which includes the hierarchical argument. In the documentation in models/custom.py it says that when hierarchical==False, the model should return the logits of the classification task. However, both the models/resnet.py and models/convnext.py implementations appear incorrect.

  • In the former, the forward method skips layers 1-4, resulting in a channel mismatch when passing the output of self.maxpool(x) to the fully connected layer.
  • In the latter, the forward method method skips right to the fully connected layer, also resulting in a tensor sizer mismatch error

Is the hierarchical parameter even necessary? Is there a scenario in which it's used during the pretraining and if so, what should the actual behavior be?

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