I need coding help with deep learning C5_W4 notebook - Transformers

persistent error in Exercise #5 (Creating Encoder) - error as noted below

I cannot see why my output -‘x’ is not a tensor here. All prior modules have been passed. The output x appears to have all the proper (tensor) dimensions (there is no point in the start coding at which the shape is explicitly set or changed, and the output x is being passed through layers which appear to be tensors

Any help would be appreciated.

AssertionError Traceback (most recent call last)

in

1 # UNIT TEST

----> 2 Encoder_test(Encoder)

~/work/W4A1/public_tests.py in Encoder_test(target)

116 encoderq_output = encoderq(x, True, None)

117

→ 118 assert tf.is_tensor(encoderq_output), “Wrong type. Output must be a tensor”

119 assert tuple(tf.shape(encoderq_output).numpy()) == (x.shape[0], x.shape[1], embedding_dim), f"Wrong shape. We expected ({x.shape[0]}, {x.shape[1]}, {embedding_dim})"

120 assert np.allclose(encoderq_output.numpy(),

AssertionError: Wrong type. Output must be a tensor