In week 3 of Course 4, for the line
next_word = transformer_utils.next_word(model, padded_question, tokenized_answer)
I’m getting the error to be as:
seq = 1 - tf.cast(tf.math.equal(decoder_token_ids, 0), tf.float32)
TypeError: Failed to convert elements of <transformer_utils.Transformer object at 0x7f4428792220> to Tensor. Consider casting elements to a supported type. See https://www.tensorflow.org/api_docs/python/tf/dtypes for supported TF dtypes.