Hacks for Google Colab…
Ways get more from colab
Google Colab is a free cloud based plateform for running machine learning and deep learning models. Through this plateform we can havee access to free GPUs and TPU to learn machine learning Model. It provide us Initial RAM of 12.72 GB which can be less for running models.
So, let’s start our hacks 💡💡… to get more out of COLAB.
- Increse RAM of Colab Notebook.
Earlier it was possible to increase the ram of colab notebook by filling the all RAM available than it ask for alloting more ram itself. BUT NOW THIS TRICK DIDN”T WORK. SO what we can do it to make a copy of previous COLAB notebook which has more RAM alloted from earlier.So use the folloing link Click here.
Connect notebook to your Drive and Create a copy of it in your own Drive and have fun with your Model.
2. Getting data to COLAB directly from Kaggle.
a) Click on the profile pic of ur Kaggle handle and select the ‘My account’
b) Scroll down to API and select ‘Expire API Token’ and now select the ‘Create New API Token’.
c) A jason file will be downloaded. Copy the copy ‘KAGGLE_USERNAME’ and ‘KAGGLE_KEY’ from .json file and paste in code.
d) Go to the Your Competition copy API token and paste it.
Now run the cell.
os.environ['KAGGLE_USERNAME'] = "xxxxxxxxxxxxx" # enter username.
os.environ['KAGGLE_KEY'] = "xxxxxxxxxxxx" # enter kaggle key.
#required API command
!kaggle competitions download -c digit-recognizer
This’s all You are done.
3. Mount Google Drive to COLAB.
For mounting the google drive to COLAB just ren the below code…
from google.colab import drive
A link will appear, open the link , copy token and paste it in colab than press enter. You are Done!!
4. Uploading a file to COLAB.
Run the following code and browse the file you want to upload.
from google.colab import files
I hope this article has been helpful to you and use this wonderful and free toolto build ur model. Please share your extra tips in the comments below. Happy coding!