Skip to content
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

Can you please share a working demo on Google Colab? #10

Closed
VirajBagal opened this issue Feb 27, 2022 · 1 comment
Closed

Can you please share a working demo on Google Colab? #10

VirajBagal opened this issue Feb 27, 2022 · 1 comment
Labels
question Further information is requested

Comments

@VirajBagal
Copy link

>>> import torch
>>> import torchvision.models as models
>>> from nebullvm import optimize_torch_model
>>> model = models.efficientnet_b0()
>>> bs, input_sizes = 1, [(3, 256, 256)]
>>> save_dir = "."
>>> optimized_model = optimize_torch_model(
...     model, batch_size=bs, input_sizes=input_sizes, save_dir=save_dir
... )
>>> x = torch.randn((bs, *input_sizes[0]))
>>> res = optimized_model(x)

This script doesn't work on Google Colab.

@diegofiori diegofiori added the question Further information is requested label Feb 27, 2022
@valeriosofi
Copy link
Collaborator

Hi @VirajBagal, what error did you get? When you try it on Colab make sure you install Nebullvm and compilers, and restart the runtime after installation before optimizing your model. I can share with you a notebook that I personally tested and it works with the example in pytorch that you provided: https://colab.research.google.com/drive/151y0fsaMfMBI9bPe2r3pd5KYunl1_LIu?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants