C5_W4_A1_Transformer_Subclass_v1 tuple has no rank

How do I solve this error. tried converting into numpy array as well

Do not use np.array(), that’s not useful.
There appears to be a problem with your code for the scaled_attention_logits.

Also in “output = …”, you should use tf.matmul(), as the instructions suggest.

Also, this thread is recommend reading:

Thanks a lot @TMosh sir. Yes this is what I was doing wrong.