using tf.print in roberta
This commit is contained in:
@@ -74,7 +74,7 @@ class TFRobertaMainLayer(TFBertMainLayer):
|
|||||||
input_ids = inputs
|
input_ids = inputs
|
||||||
|
|
||||||
if tf.not_equal(tf.reduce_sum(input_ids[:, 0]), 0):
|
if tf.not_equal(tf.reduce_sum(input_ids[:, 0]), 0):
|
||||||
logger.warning("A sequence with no special tokens has been passed to the RoBERTa model. "
|
tf.print("A sequence with no special tokens has been passed to the RoBERTa model. "
|
||||||
"This model requires special tokens in order to work. "
|
"This model requires special tokens in order to work. "
|
||||||
"Please specify add_special_tokens=True in your encoding.")
|
"Please specify add_special_tokens=True in your encoding.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user