softmax of frame activations Args: Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: softmax applied 3d tensor (B, Tmax, odim)
(self, hs_pad)
| 177 | return loss |
| 178 | |
| 179 | def softmax(self, hs_pad): |
| 180 | """softmax of frame activations |
| 181 | |
| 182 | Args: |
| 183 | Tensor hs_pad: 3d tensor (B, Tmax, eprojs) |
| 184 | Returns: |
| 185 | torch.Tensor: softmax applied 3d tensor (B, Tmax, odim) |
| 186 | """ |
| 187 | if self.ctc_lo is not None: |
| 188 | return F.softmax(self.ctc_lo(hs_pad), dim=2) |
| 189 | else: |
| 190 | return F.softmax(hs_pad, dim=2) |
| 191 | |
| 192 | def log_softmax(self, hs_pad): |
| 193 | """log_softmax of frame activations |
no outgoing calls
no test coverage detected