-
Notifications
You must be signed in to change notification settings - Fork 231
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
How to load MobileViT for my project #69
Comments
Their code of creating model is kind of messy, but I trace their code and found a way to somewhat get rid of it. import torch
from options.opts import get_training_arguments
from cvnets import get_model
def save_model(*args, **kwargs):
opts = get_training_arguments()
model = get_model(opts)
torch.save(model, 'model_structure.pt')
if __name__ == "__main__":
save_model()
to get the whole specific model structure saved in pt file. From now on, we can do whatever we want without a lot of unnecessary dependency / information. import torch
model = torch.load('model_structure.pt')
model.load_state_dict(torch.load('weight.pt'))
# Train ... Little suggestion to the dev team, some sample code of how to inference your model that list in model_zoo using a single sample picture in 'simple python code' (not some prebuilt executable) will be helpful, like any other modern github model release will do. (https://github.com/openai/CLIP FYI) |
how do i use ml-cvnet? export CFG_FILE="config/classification/imagenet/resnet.yaml" main_train: Command not found |
I also have this question,are you have a solution? |
|
I want to fine tune the Mobilevit model for my dataset (only classification model needed). So, I need to download the Mobilevit xxs version, with Imagenet pretrained weights. I have implemented the Read me instructions. I have issues downloading the classification Mobilevit model. Could you please guide me? |
Hi!
I want to use MobileViT and train it using my own dataset (on Google Colab). I couldn't understand how can I use the code in this repository to instantiate just MobileViT model, and use it (I have a very specific data augmentation functions to use).
I am looking for a code to do something like this:
How can I do that with the original implementation of MobileViT ?
The text was updated successfully, but these errors were encountered: