Muhammad Shahzad
Muhammad Shahzad

Reputation: 381

Importing any embedding layer from TensorFlow Hub gives URL error (Kaggle Kernel)

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)
I am using Kaggle Notebook for this work. Importing any embedding layer from TensorFlow Hub gives URL error. Could anyone please guide me to resolve this issue?

The error message is as follows:
URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

Upvotes: 1

Views: 309

Answers (1)

foobar
foobar

Reputation: 619

Try turning on internet access of your kaggle kernel. Be default, your kernel has no internet access, you have to turn it on to get resources from other site. See: https://www.kaggle.com/product-feedback/63544

Upvotes: 1

Related Questions