tfds.load函数异常,All attempts to get a Google authentication bearer token failed

tensorflow 加载数据集异常

异常错误提示:

tensorflow/core/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: Couldn't resolve host 'metadata'".

解决方法:改成如下对应的版本就行

tensorflow=2.3.0 and tensorflow-datasets=2.1.0

命令如下:

pip install tensorflow-datasets==2.1.0

想详细了解的同学可以去查看以下两个网址:

https://github.com/PAIR-code/lit/issues/26

https://github.com/PAIR-code/lit/issues/22

你可能感兴趣的:(机器学习,tensorflow,python,tensorflow,机器学习)