espnet.nets.pytorch_backend.rnn.attentions.att_to_numpy
Less than 1 minute
espnet.nets.pytorch_backend.rnn.attentions.att_to_numpy
espnet.nets.pytorch_backend.rnn.attentions.att_to_numpy(att_ws, att)
Converts attention weights to a numpy array given the attention
- Parameters:
- att_ws (list) – The attention weights
- att (torch.nn.Module) – The attention
- Return type: np.ndarray
- Returns: The numpy array of the attention weights