【发布时间】:2021-04-21 11:52:37
【问题描述】:
我一直在关注 tensorflow 的机器翻译教程:Neural machine translation with attention
我想在 Japanes to English dataset 上使用相同的代码,但它引发了以下错误:
当我尝试使用浏览器下载文件时,它可以正常运行。
我的代码:
# Download the file
path_to_zip = tf.keras.utils.get_file(
'jpn-eng.zip', origin='http://www.manythings.org/anki/jpn-eng.zip', extract=True)
path_to_file = os.path.dirname(path_to_zip)+"/jpn-eng/jpn.txt"
【问题讨论】:
-
网站 www.manythings.org 似乎拒绝了
tf.keras.utils.get_file的请求,可能是由于 HTTP 请求头信息不满足最小信息,您可以通过先下载文件来解决它(例如 @ 987654327@ 和!unzip jpn-eng.zip) 然后加载它
标签: python tensorflow tensorflow2.0 tf.keras machine-translation