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 http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl 
    !pip3 install torchvision
    !pip3 install unidecode

To connect to G-drive use

    !pip install -U -q PyDrive
    from pydrive.auth import GoogleAuth
    from pydrive.drive 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.
    auth.authenticate_user()
    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})

    data.GetContentFile('obama.txt')

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