tensorflow-dataset-如何用tfds格式制作我们自己的数据集? [英] tensorflow-dataset- How to make our own dataset with tfds format?

查看:84
本文介绍了tensorflow-dataset-如何用tfds格式制作我们自己的数据集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 TensorFlow 教程中,我遇到了从 TensorFlow 数据集加载数据集的代码.

From a TensorFlow tutorial , I came across a code that load dataset from TensorFlow dataset.

dataset, metadata = tfds.load('cycle_gan/horse2zebra',
                              with_info=True, as_supervised=True)
train_horses, train_zebras = dataset['trainA'], dataset['trainB']
test_horses, test_zebras = dataset['testA'], dataset['testB']

但是,我想加载不是来自 TensorFlow 数据集的我自己的数据集.在收集了我自己的数据集后,我不知道如何加载我的数据集并将其处理为与 TensorFlow tfds 相同的格式.

However, I want to load my own dataset that is not from TensorFlow dataset. After collecting my own dataset, I had no idea how to load my dataset and process it to the same format as TensorFlow tfds.

谁能教我怎么做?我的数据集文件夹也有相同的格式:trainA、trainB、testA、testB.

Anyone can teach me how to do that? My dataset folder also has the same format : trainA, trainB , testA , testB.

推荐答案

请按照本教程向 TFDS 添加数据集.

Please follow this tutorial to add a dataset to TFDS.

https://github.com/tensorflow/datasets/blob/master/docs/add_dataset.md

这篇关于tensorflow-dataset-如何用tfds格式制作我们自己的数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆