Hi.
The instruction point no. 1 says:
" 1. You will pass the Q, V, K matrices and a boolean mask to a multi-head attention layer. Remember that to compute self-attention Q, V and K should be the same. Let the default values for return_attention_scores
and training
. You will also perform Dropout in this multi-head attention layer during training."
So I need to pass only Q,V,K and mask.
In the init method, self.mha is initialized as a layer:
self.mha = MultiHeadAttention(num_heads=num_heads,
key_dim=embedding_dim,
dropout=dropout_rate)
Therefore, it looks like we do not have to pass anything to the layer creation process, but rather just call a layer with the parameters like so…
self.mha()(x,x,x,mask)
But this is throwing up an error and Ive been stuck here. Can someone help me with this error?
ValueError: The first argument to Layer.call
must always be passed.