Can MATLAB ResNet50 be run on Google Colab Pro?
7 views (last 30 days)
Show older comments
Dr. Anna Haywood
on 19 Jul 2021
Edited: Dr. Anna Haywood
on 21 Jul 2021
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.
0 Comments
Accepted Answer
Walter Roberson
on 20 Jul 2021
There appears to be ways to use ResNet50 in Google Colab by using the Python interface to TensorFlow; https://colab.research.google.com/github/GoogleCloudPlatform/keras-idiomatic-programmer/blob/master/notebooks/prestem_deconvolution.ipynb#scrollTo=dmaCfRwoE96Y
This would be outside of MATLAB.
3 Comments
Walter Roberson
on 20 Jul 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.
More Answers (2)
Joss Knight
on 19 Jul 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?
0 Comments
Dr. Anna Haywood
on 20 Jul 2021
1 Comment
Joss Knight
on 20 Jul 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)?
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!