Google collaborative
Asked Answered
P

1

-1

I am working on a CNN program on google colab.
I am trying to run, ImageDataGenerator.flow_from_directory.

I want to include the dataset directory in this function. I have made a google drive folder "App" and in that folder I have made "dataset" Folder in which i included my dataset for training and test.

The problem is that I am not able to include this drive folder in colab for this command.

Anyone have experience of running ImageDataGenerator.flow_from_directory on colab? How to add dataset from google drive?

Provencal answered 28/4, 2018 at 16:49 Comment(0)
B
0

According to the API, this should allow you to upload files to the colaboratory venv:

from google.colab import files
uploaded = files.upload()   
for fn in uploaded.keys():
  print('User uploaded file "{name}" with length {length} bytes'.format(
      name=fn, length=len(uploaded[fn])))
Bartko answered 29/4, 2018 at 7:50 Comment(2)
This code is to upload a file. What about already uploaded file? How can you see them. So far I have accessed uploaded files but I want to access uploaded folders. and giving them as the path of dataset for my code.Provencal
I doubt you can immediately access the drive folder where the jupyter notebook is located from within the venv.Bartko

© 2022 - 2024 — McMap. All rights reserved.