argmax of frame activations Args: torch.Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: argmax applied 2d tensor (B, Tmax)
(self, hs_pad)
| 203 | return F.log_softmax(hs_pad, dim=2) |
| 204 | |
| 205 | def argmax(self, hs_pad): |
| 206 | """argmax of frame activations |
| 207 | |
| 208 | Args: |
| 209 | torch.Tensor hs_pad: 3d tensor (B, Tmax, eprojs) |
| 210 | Returns: |
| 211 | torch.Tensor: argmax applied 2d tensor (B, Tmax) |
| 212 | """ |
| 213 | if self.ctc_lo is not None: |
| 214 | return torch.argmax(self.ctc_lo(hs_pad), dim=2) |
| 215 | else: |
| 216 | return torch.argmax(hs_pad, dim=2) |
no outgoing calls
no test coverage detected