I have been getting this error :
AssertionError Traceback (most recent call last)
in
1 # UNIT TEST
----> 2 Decoder_test(Decoder, create_look_ahead_mask, create_padding_mask)
~/work/W4A1/public_tests.py in Decoder_test(target, create_look_ahead_mask, create_padding_mask)
226 assert type(att_weights) == dict, “Wrong type for att_weights[0]. Output must be a tensor”
227 assert len(keys) == 2 * num_layers, f"Wrong length for attention weights. It must be 2 x num_layers = {2*num_layers}"
→ 228 assert tf.is_tensor(att_weights[keys[0]]), f"Wrong type for att_weights[{keys[0]}]. Output must be a tensor"
229 shape1 = (x.shape[0], num_heads, x.shape[1], x.shape[1])
230 assert tuple(tf.shape(att_weights[keys[1]]).numpy()) == shape1, f"Wrong shape. We expected {shape1}"
AssertionError: Wrong type for att_weights[decoder_layer1_block1_self_att]. Output must be a tensor
I’m pretty sure my code for UNQ_C7 is correct, but I cant find out if anything is wrong with my code for UNQ_C6 since it passes all tests