Skip to content

Instantly share code, notes, and snippets.

@ramcandrews
Created February 17, 2020 06:30
Show Gist options
  • Save ramcandrews/f474dac0d69f5dcad13e4ca37883bf59 to your computer and use it in GitHub Desktop.
Save ramcandrews/f474dac0d69f5dcad13e4ca37883bf59 to your computer and use it in GitHub Desktop.
Use this code in the top cell of your colab notebook to read data from google drive. It if you are loading thousands of image files or thousands of small files it is slower than just a few larger files.
from google.colab import drive
drive.mount('/content/drive/')
data_dir = '/content/drive/My Drive/Colab Notebooks/<your assets>/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment