def _compute_weight(self, F, query, key, mask=None):
raise NotImplementedError<EOL>
Compute attention weights based on the query and the keys

        Parameters
        ----------
        F : symbol or ndarray
        query : Symbol or NDArray
            The query vectors. Shape (batch_size, query_length, query_dim)
        key : Symbol or NDArray
            Key of the memory. Shape (batch_size, memory_length, key_dim)
        mask : Symbol or NDArray or None
            Mask the memory slots. Shape (batch_size, query_length, memory_length)
            Only contains 0 or 1 where 0 means that the memory slot will not be used.
            If set to None. No mask will be used.

        Returns
        -------
        att_weights : Symbol or NDArray
            For single-head attention, Shape (batch_size, query_length, memory_length)
            For multi-head attention, Shape (batch_size, num_heads, query_length, memory_length)