Colab allows you to use GPU VM’s free of charge and is ideal for medium experiments. Below is a snippet to use/import data into the VM. It assumes that you have a file on your G-drive called ‘Obama.txt’. When you right-click on the file you can share it via a link. This link contains the id you need below to import it into the VM. Once the file is imported you can use the regular file-name.

To enable things GPU on colab you need to install Torch first with

    !pip3 install 
    !pip3 install torchvision
    !pip3 install unidecode

To connect to G-drive use

    !pip install -U -q PyDrive
    from pydrive.auth import GoogleAuth
    from import GoogleDrive
    from google.colab import auth
    from oauth2client.client import GoogleCredentials

    # Authenticate and create the PyDrive client.
    # This only needs to be done once per notebook.
    gauth = GoogleAuth()
    gauth.credentials = GoogleCredentials.get_application_default()
    drive = GoogleDrive(gauth)

Fetch the id via the sharing-link and add

    file_id = '1J443odfMqRbBJJkpu81LOou2MaDkjSUi'
    data = drive.CreateFile({'id': file_id})


which makes the file available with the same name in the VM.