nebuly
nebuly copied to clipboard
Can you please share a working demo on Google Colab?
>>> 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.
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