国内如何使用tensorflow_datasets加载mnist数据
国内使用tensorflow_datasets无法下载数据,可以通过kaggle下载或转格式的方法解决。
报错
import numpy as np
import tensorflow_datasets as tfds
dataset, info = tfds.load(
"mnist", data_dir="gs://tfds-data/datasets", with_info=True, as_supervised=True
)
报错:
2024-08-23 17:25:05.371154: W tensorflow/tsl/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata.google.internal".
2024-08-23 17:26:06.386193: E tensorflow/tsl/platform/cloud/curl_http_request.cc:610] The transmission of request 0x213a5b00 (URI: https://www.googleapis.com/storage/v1/b/tfds-data/o/datasets%2Fmnist?fields=size%2Cgeneration%2Cupdated) has been stuck at 0 of 0 bytes for 61 seconds and will be aborted.
。。。。
RuntimeError: AbortedError: Failed to



被折叠的 条评论
为什么被折叠?



