Skip to content

Conversation

lessw2020
Copy link

Currently the reset_classifier function does not work, as there is no self.out_dim in the model.

I've updated reset_classifier to work by using the current head in_features to determine the in channels for the new head.

I also removed global_pool param, which was dead weight and was not being used.
I added a force option in case you are not changing num_classes but still want to reset (defaults to off).
Finally, added a to_gpu flag b/c in building a model that is on cpu atm, you don't want to force only the head to gpu if the entire model will be moved later, which was how the initial version was setup.

@ghost
Copy link

ghost commented Jul 29, 2021

CLA assistant check
All CLA requirements met.

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

Successfully merging this pull request may close these issues.

1 participant