How to get input shape for each pretrained model? #1158
-
|
Beta Was this translation helpful? Give feedback.
Answered by
TorbenSDJohansen
Feb 25, 2022
Replies: 1 comment 2 replies
-
To get the default input shape, one way would be to run the following code: import timm
model_to_input_size = {}
for model in timm.list_models():
default_cfg = timm.models.registry._model_default_cfgs.get(model, None)
input_size = default_cfg['input_size'] if default_cfg else None
model_to_input_size[model] = input_size Note that very few models do not have a |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
JohnG0024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To get the default input shape, one way would be to run the following code:
Note that very few models do not have a
default_cfg
. These are, e.g., deprecated models.