Skip to content

Instantly share code, notes, and snippets.

@hanneshapke
Last active May 19, 2020 22:44
Show Gist options
  • Save hanneshapke/f15b1254022d1e1b7981ba9be53e7e37 to your computer and use it in GitHub Desktop.
Save hanneshapke/f15b1254022d1e1b7981ba9be53e7e37 to your computer and use it in GitHub Desktop.
import tensorflow_hub as hub
BERT_TFHUB_URL = "https://tfhub.dev/tensorflow/bert_en_uncased_L-12_H-768_A-12/2"
bert_layer = hub.KerasLayer(handle=BERT_TFHUB_URL, trainable=True)
vocab_file_path = bert_layer.resolved_object.vocab_file.asset_path.numpy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment