-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add MobileViT-XS to MCT-model garden #1049
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the comments
"!rm -f imagenet/val/ILSVRC2012_img_val.tar\n", | ||
"# We follow https://github.com/pytorch/examples/blob/main/imagenet/extract_ILSVRC.sh here\n", | ||
"# get script from soumith and run; this script creates all class directories and moves images into corresponding directories\n", | ||
"!cd imagenet/val/ && wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider to take the code from here, looks more elegant.. https://github.com/sony/model_optimization/blob/main/tutorials/notebooks/keras/ptq/example_keras_imagenet.ipynb
"\n", | ||
"### Download a Pre-Trained Model \n", | ||
"\n", | ||
"We begin by loading a pre-trained [MobileViT-XS](https://huggingface.co/SSI-DNN/pytorch_mobilevit_xs) model. This implementation is based on [Timm](https://github.com/huggingface/pytorch-image-models) and includes a slightly modified version of timm/Attention module that was adapted for model quantization. For further insights into the model's implementation details, please refer to [MCT Models Garden - yolov8](https://github.com/sony/model_optimization/tree/main/tutorials/mct_model_garden/models_pytorch/mobilevit_xs). " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a few words what are the adjustments (batch issue..)
" target_platform_version='v1')\n", | ||
"\n", | ||
"# Specify the necessary configuration for mixed precision quantization. To keep the tutorial brief, we'll use a small set of images and omit the hessian metric for mixed precision calculations. It's important to be aware that this choice may impact the resulting accuracy. \n", | ||
"mp_config = mct.core.MixedPrecisionQuantizationConfig(num_of_images=5,\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if compression is required..
Pull Request Description:
Add MobileViT-XS to MCT-model garden
Add MobileViT-XS tutorial
Checklist before requesting a review: