【问题标题】:Importing any embedding layer from TensorFlow Hub gives URL error (Kaggle Kernel)从 TensorFlow Hub 导入任何嵌入层会导致 URL 错误(Kaggle 内核)
【发布时间】:2021-02-16 05:10:51
【问题描述】:

import tensorflow as tf
import tensorflow_hub as hub
module_url = "https://tfhub.dev/tensorflow/bert_en_uncased_L-24_H-1024_A-16/1"
bert_layer = hub.KerasLayer(module_url, trainable=True)
我正在使用 Kaggle Notebook 来完成这项工作。从 TensorFlow Hub 导入任何嵌入层都会导致 URL 错误。谁能指导我解决这个问题?

报错信息如下:
URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

【问题讨论】:

    标签: python tensorflow machine-learning nlp tensorflow-hub


    【解决方案1】:

    尝试打开你的 kaggle 内核的互联网访问。默认情况下,您的内核无法访问 Internet,您必须打开它才能从其他站点获取资源。看: https://www.kaggle.com/product-feedback/63544

    【讨论】:

    • 非常感谢@Muhammad。
    猜你喜欢
    • 2019-04-11
    • 2017-08-30
    • 1970-01-01
    • 2018-05-23
    • 1970-01-01
    • 2023-03-13
    • 1970-01-01
    • 2020-11-16
    • 1970-01-01
    相关资源
    最近更新 更多