访问 TensorFlow 数据集

Accessing TensorFlow datasets

提问人:Reem 提问时间:10/25/2023 更新时间:10/25/2023 访问量:12

问:

我想在此链接中访问 TensorFlow 提供的数据集。如何获取这些数据?我遵循了这个笔记本,但是,它给了我这个错误:

Downloading and preparing dataset 1.59 GiB (download: 1.59 GiB, generated: Unknown size, total: 1.59 GiB) to /root/tensorflow_datasets/amazon_us_reviews/Wireless_v1_00/0.1.0...
Dl Completed...: 0%
0/1 [00:00<?, ? url/s]
Dl Size...:
0/0 [00:00<?, ? MiB/s]
Extraction completed...:
0/0 [00:00<?, ? file/s]
---------------------------------------------------------------------------
DownloadError                             Traceback (most recent call last)
<ipython-input-4-9f7684930fc8> in <cell line: 1>()
----> 1 ds = tfds.load('amazon_us_reviews', split='train', shuffle_files=True)
      2 assert isinstance(ds, tf.data.Dataset)
      3 print(ds)

23 frames
/usr/local/lib/python3.10/dist-packages/tensorflow_datasets/core/download/downloader.py in _assert_status(response)
    332   """Ensure the URL response is 200."""
    333   if response.status_code != 200:
--> 334     raise DownloadError(
    335         'Failed to get url {}. HTTP code: {}.'.format(
    336             response.url, response.status_code

DownloadError: Failed to get url https://s3.amazonaws.com/amazon-reviews-pds/tsv/amazon_reviews_us_Wireless_v1_00.tsv.gz. HTTP code: 403.
TensorFlow 数据集 TensorFlow-Datasets

评论


答: 暂无答案