admin管理员组文章数量:1287598
I was trying to load the dataset from tensorflow datasets without having it to download locally and process it to a pipeline in batches so i can feed it into my model. I'm not sure if I'm doing it correct, if it is not the correct approach to do so please mention one.
import tensorflow as tf
import tensorflow_datasets as tfds
# tf.__version__
# '2.18.0'
(train_data, test_data), info= tfds.load('open_images_v4',
split=['train','test'],
download=False,
try_gcs=True,
as_supervised=True,
shuffle_files=True,
with_info = True,
)
I tried using tensorflow_datasets.load()
to load the dataset but it throws assertion errors as:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-9-5483ac7d6ce0> in <cell line: 0>()
----> 1 (train_data, test_data), info= tfds.load('open_images_v4',
2 split=['train','test'],
3 download=False,
4 try_gcs=True,
5 as_supervised=True,
3 frames
/usr/local/lib/python3.11/dist-packages/tensorflow_datasets/core/dataset_builder.py in as_dataset(self, split, batch_size, shuffle_files, decoders, read_config, as_supervised)
1002 # pylint: enable=line-too-long
1003 if not self.data_path.exists():
-> 1004 raise AssertionError(
1005 "Dataset %s: could not find data in %s. Please make sure to call "
1006 "dataset_builder.download_and_prepare(), or pass download=True to "
AssertionError: Dataset open_images_v4: could not find data in /root/tensorflow_datasets. Please make sure to call dataset_builder.download_and_prepare(), or pass download=True to tfds.load() before trying to access the tf.data.Dataset object.
本文标签:
版权声明:本文标题:tensorflow2.0 - Stream data to a model form tensorflow datasets without having it to download locally - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741314154a2371819.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论