Skip to content

MobileNetV1 from HuggingFace #1436

Answered by deJQK
deJQK asked this question in Q&A
Aug 25, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

The reason is that in the provided huggingface model, the pretrained_cfg has 'architectures' instead of 'architecture' as a key, so this line can be followed by if model_name is None: model_name = pretrained_cfg.get('architectures')[0]. However, the model_name of MobileNetV1ForImageClassification is not defined nor registered so this line will raise an error. I do not know how to use the MobileNetV1ForImageClassification as stated on this page. Specifically, I am not able to do from transformers import MobileNetV1ForImageClassification.

My final solution to use MobileNetV1 is to define it by myself in a local models directory, copying and modifying the module EfficientNet to a new module M…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@rwightman
Comment options

@deJQK
Comment options

Answer selected by deJQK
Comment options

You must be logged in to vote
3 replies
@deJQK
Comment options

@deJQK
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants