问题描述
我正在研究Google colab上的CNN程序.
我正在尝试运行ImageDataGenerator.flow_from_directory.
I am working on a CNN program on google colab.
I am trying to run, ImageDataGenerator.flow_from_directory.
我想在此函数中包含数据集目录.我制作了一个Google驱动器文件夹"App",在该文件夹中制作了数据集"文件夹,其中包含了我用于训练和测试的数据集.
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.
问题是我无法将此命令的驱动器文件夹包含在colab中.
The problem is that I am not able to include this drive folder in colab for this command.
有人在colab上运行ImageDataGenerator.flow_from_directory有经验吗?如何从谷歌驱动器添加数据集?
Anyone have experience of running ImageDataGenerator.flow_from_directory on colab?How to add dataset from google drive?
推荐答案
根据 API ,这应该允许您将文件上传到协作型venv:
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])))
这篇关于Google协作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!