File "/tf/transformer_utils.py", line 547, in create_padding_mask *
seq = 1 - tf.cast(tf.math.equal(decoder_token_ids, 0), tf.float32)
TypeError: Failed to convert elements of <transformer_utils.Transformer object at 0x7f3ce95c69d0> to Tensor. Consider casting elements to a supported type. See https://www.tensorflow.org/api_docs/python/tf/dtypes for supported TF dtypes.
A detailed post with error encountered with which grade cell and how you have recalled the codes without mentioning directly the codes would benefit you more from getting faster response.
According rather than copy pasting the errors, click a screenshot which will capture the issue in toto.
When you have lengthy error, you can always click two different sections of the error.
So kindly provide details about which grade cell you encountered this issue as the error indicated.
Also when I just copy pasted your error on the search tool, I got a similar thread, so I advise you to use it search similar error assignment threads which previously learners must have encountered. Referring them sometimes helps you debugging.
I noticed one of the code line is completely missing in your code, so by any chance you deleted the code after we are suppose to add dimension, which creates id for end of sequence eos.
This code line is not present in your code cell
Get the id of the EOS token
or probably you are using an obselete copy, in any case, please get a fresh copy and re-do the assignment as you might fail the grader if you are working on an old copy or edited out cell.