Can MATLAB ResNet50 be run on Google Colab Pro?

5 visualizzazioni (ultimi 30 giorni)
Just now came across this new video showing that MATLAB code can be run on Google Colab by installing Octave first. Any ideas on how to get a MATLAB ResNet50 model to run on Colab, too? This is important because Colab has a GPU for my 5204 images.

Risposta accettata

Walter Roberson
Walter Roberson il 20 Lug 2021
  3 Commenti
Walter Roberson
Walter Roberson il 20 Lug 2021
Mathworks actively markets the Python interface, and there are a lot of postings about using the Python interface; it is not uncommon for MATLAB users to be advised to use a Python package if one already exists.
Dr. Anna Haywood
Dr. Anna Haywood il 21 Lug 2021
Modificato: Dr. Anna Haywood il 21 Lug 2021
Thank so much for your help and link! I clicked on it and am investigating this new Python world ;-)

Accedi per commentare.

Più risposte (2)

Joss Knight
Joss Knight il 19 Lug 2021
I'm not sure how in-guidelines it is to be asking about running Octave as a substitute for MATLAB on this forum! I'm pretty sure, however, that ResNet50 is very unlikely to work in Octave.
If you want cloud solutions for running MATLAB you should start here (but Google is not one of the options). Have you considered just using MATLAB Online, for instance, and MATLAB Drive for your data storage?

Dr. Anna Haywood
Dr. Anna Haywood il 20 Lug 2021
I have tried both MATLAB Online and desktop with Statistics and Machine Learning Toolbox installed. Unfortunately, desktop takes about 18 hours to process my 5204 images through ResNet50. Then, MATLAB Online either times out or runs out of memory and also does not appear to have a GPU.
I have also tried my college where I teach which has a site license for just regular MATLAB but no ML toolbox. Been trying to find a solution for about a month. Gotta be some way to use ResNet50 in an efficient manner?
  1 Commento
Joss Knight
Joss Knight il 20 Lug 2021
The obvious answer is 'get a GPU'! but I'm assuming your question is just how can I rent a GPU? There are many options if you follow the link I gave. It basically revolves around renting a machine with a GPU in Amazon EC2 or Azure and installing MATLAB there using one of the images available. A neat option is the MATLAB GPU container which you can use through the NVIDIA GPU Cloud.
If what you want is a way for MathWorks to provide you with a rented machine with a GPU without you also having to have an account with a cloud service provider then unfortunately...MATLAB online is all we provide, and those machines don't have GPUs. Hosting machines in the cloud is expensive, machines with GPUs - very expensive. But we're working on some solutions, perhaps that will involve some sort of pay-as-you-go through your MathWorks account.
If you're willing to consider buying a GPU for your desktop then that's an obvious solution, you don't need much if you don't want the latest card (try a GTX 1050 perhaps).
Also worth asking, are you training Resnet50, or just using it? I'm guessing you're fine-tuning? If you're just using it for prediction then it certainly shouldn't be taking 18 hours, even on a slow CPU. If you're training, how many epochs do you need to fit to your data? Have you considered trying a smaller model (squeezenet or mobilenet perhaps)?

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by