espnet2.main_funcs.calculate_all_attentions.calculate_all_attentions
Less than 1 minute
espnet2.main_funcs.calculate_all_attentions.calculate_all_attentions
espnet2.main_funcs.calculate_all_attentions.calculate_all_attentions(model: AbsESPnetModel, batch: Dict[str, Tensor]) β Dict[str, List[Tensor]]
Derive the outputs from the all attention layers
- Parameters:
- model
- batch β same as forward
- Returns: A dict of a list of tensor. key_names x batch x (D1, D2, β¦)
- Return type: return_dict
