-
Notifications
You must be signed in to change notification settings - Fork 27
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
Don't download model weights and load imagenet weights if using models for inference #144
Comments
This also arises if we are training a model that has labels which are a subset of the zamba labels, which means we "resume training" instead of replacing the head. This stems from the fact that zamba/zamba/models/model_manager.py Lines 139 to 147 in 7986c41
In addition: we may want zamba/zamba/models/efficientnet_models.py Line 27 in 7fb2a0f
|
The code has changed a lot. Has this bug been resolved? I'm trying to work on this if it's not resolved. |
@papapizzachess yes this bug still exists and the code sections in the issue description are still correct. |
We currently use
load_from_checkpoint
in ourModelManager
to initialize models when doing inference. This can cause the models to download the pretrained imagenet weights from the internet even thought we don't need those. To address this, we need a parameter that we pass in to the__init__
of the model to indicate we are doing inference/loading from a checkpoint, and then we need to pass this paramter toload_from_checkpoint
in theModelManager
.We should check across all of our models for this behavior, but this is how it works for the
time_distributed
model:Here is where we need to pass a parameter indicating that we're doing inference:
zamba/zamba/models/model_manager.py
Lines 98 to 101 in 7fb2a0f
Here is where we need to use that param to skip intializing from timm:
zamba/zamba/models/efficientnet_models.py
Lines 23 to 27 in 7fb2a0f
The text was updated successfully, but these errors were encountered: