espnet.nets.chainer_backend.transformer.mask.make_history_mask
Less than 1 minute
espnet.nets.chainer_backend.transformer.mask.make_history_mask
espnet.nets.chainer_backend.transformer.mask.make_history_mask(xp, block)
Prepare the history mask.
- Parameters:block (ndarray) – Block with dimensions: (B x S).
- Returns: History mask with dimensions (B, S, S).
- Return type: ndarray, np.ndarray