You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
TF Version: 2.3.0-dev20200612
Hub version: 0.8.0
Running Bert with Tensorflow for text classification.
I've got stucked here:
train_features = bert.run_classifier.convert_examples_to_features(train_InputExamples, label_list, MAX_SEQ_LENGTH, tokenizer)
The error is:
AttributeError: module 'bert.tokenization' has no attribute 'printable_text'
Last call:
run_classifier.py in (.0)
464 tf.logging.info("guid: %s" % (example.guid))
465 tf.logging.info("tokens: %s" % " ".join(
--> 466 [tokenization.printable_text(x) for x in tokens]))
467 tf.logging.info("input_ids: %s" % " ".join([str(x) for x in input_ids]))
468 tf.logging.info("input_mask: %s" % " ".join([str(x) for x in input_mask]))
The line is 466 because I've added:
import tensorflow.compat.v1 as tf.
Maybe the printable_text is not compatible with the tf.logging.info.
TF Version: 2.3.0-dev20200612
Hub version: 0.8.0
Running Bert with Tensorflow for text classification.
I've got stucked here:
train_features = bert.run_classifier.convert_examples_to_features(train_InputExamples, label_list, MAX_SEQ_LENGTH, tokenizer)
The error is:
AttributeError: module 'bert.tokenization' has no attribute 'printable_text'
Last call:
run_classifier.py in (.0)
464 tf.logging.info("guid: %s" % (example.guid))
465 tf.logging.info("tokens: %s" % " ".join(
--> 466 [tokenization.printable_text(x) for x in tokens]))
467 tf.logging.info("input_ids: %s" % " ".join([str(x) for x in input_ids]))
468 tf.logging.info("input_mask: %s" % " ".join([str(x) for x in input_mask]))
The line is 466 because I've added:
import tensorflow.compat.v1 as tf.
Maybe the printable_text is not compatible with the tf.logging.info.