Skip to content

Commit

Permalink
fixes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
kpe committed Jan 6, 2020
1 parent 699a800 commit 14deaf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bert/tokenization/albert_tokenization.py
Expand Up @@ -26,7 +26,6 @@
import six
from six.moves import range
import tensorflow.compat.v1 as tf
import tensorflow_hub as hub
import sentencepiece as spm

SPIECE_UNDERLINE = u"▁".encode("utf-8")
Expand Down Expand Up @@ -258,6 +257,7 @@ def from_scratch(cls, vocab_file, do_lower_case, spm_model_file):
@classmethod
def from_hub_module(cls, hub_module, spm_model_file):
"""Get the vocab file and casing info from the Hub module."""
import tensorflow_hub as hub
with tf.Graph().as_default():
albert_module = hub.Module(hub_module)
tokenization_info = albert_module(signature="tokenization_info",
Expand Down

0 comments on commit 14deaf3

Please sign in to comment.