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
I try to run this version of Bert (train_bert_toy_task.py) on my pc and an error arises:
pred must not be a Python bool
I tried to solve it, replacing True with tf.constant(True, dtype=tf.bool), but it induced the other error:
TypeError: Using a tf.Tensor as a Python bool is not allowed. Use if t is not None: instead of if t: to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.
I noticed that the error "pred must not be a Python bool" is also in line 31, where we have no explicit True value, but in bert_train_fn we have use_one_hot_embeddings that is the reason of error.
I don't know if it matter, but the very first error were "no module modeling" that is imported in every .py file in this repository. I decided that it was meant bert_modeling, so the bert_modeling.py exists in this repository. But may be I made a mistake? If so what kind of modeling was meant?
Thank you
The text was updated successfully, but these errors were encountered:
Hi,
I try to run this version of Bert (train_bert_toy_task.py) on my pc and an error arises:
I tried to solve it, replacing True with tf.constant(True, dtype=tf.bool), but it induced the other error:
I noticed that the error "pred must not be a Python bool" is also in line 31, where we have no explicit True value, but in bert_train_fn we have use_one_hot_embeddings that is the reason of error.
I don't know if it matter, but the very first error were "no module modeling" that is imported in every .py file in this repository. I decided that it was meant bert_modeling, so the bert_modeling.py exists in this repository. But may be I made a mistake? If so what kind of modeling was meant?
Thank you
The text was updated successfully, but these errors were encountered: