I have processed some png images on Colab and saved them in the Colab Directory. Now I want to save these images from Colab to Google Drive. How can I do this?
1 Answer
Just mount your drive into Colab and create the checkpoint in the mount point location. Let me try to explain this with an example:
- Mount the drive as follows:
from google.colab import drive
drive.mount('/content/gdrive')
This will mount your drive and your google drive files should be all under /content/gdrive/My Drive/
location
- Now use your location as you would use any other location in bash or create the check-point directory as follows:
You can use the
!
to run bash commands in notebooks as follows:
!cp -r <PATH_TO_PNG_FOLDER> /content/gdrive/My Drive/