I have some bug found in unit testing:
60 assert np.allclose(weights, [[0.2589478, 0.42693272, 0.15705977, 0.15705977],
61 [0.2772748, 0.2772748, 0.2772748, 0.16817567],
—> 62 [0.33620113, 0.33620113, 0.12368149, 0.2039163 ]])
63
64 assert tf.is_tensor(attention), “Output must be a tensor”
AssertionError:
Not sure what’s wrong with my code:
def scaled_dot_product_attention(q, k, v, mask):
# START CODE HERE
# mentor edit: code removed
# END CODE HERE
return output, attention_weights