MCPcopy Index your code
hub / github.com/modelscope/FunASR / log_softmax

Method log_softmax

funasr/models/ctc/ctc.py:192–203  ·  view source on GitHub ↗

log_softmax of frame activations Args: Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: log softmax applied 3d tensor (B, Tmax, odim)

(self, hs_pad)

Source from the content-addressed store, hash-verified

190 return F.softmax(hs_pad, dim=2)
191
192 def log_softmax(self, hs_pad):
193 """log_softmax of frame activations
194
195 Args:
196 Tensor hs_pad: 3d tensor (B, Tmax, eprojs)
197 Returns:
198 torch.Tensor: log softmax applied 3d tensor (B, Tmax, odim)
199 """
200 if self.ctc_lo is not None:
201 return F.log_softmax(self.ctc_lo(hs_pad), dim=2)
202 else:
203 return F.log_softmax(hs_pad, dim=2)
204
205 def argmax(self, hs_pad):
206 """argmax of frame activations

Callers 15

forward_one_stepMethod · 0.45
forward_one_stepMethod · 0.45
scoreMethod · 0.45
default_beam_searchMethod · 0.45
time_sync_decodingMethod · 0.45
_calc_transducer_lossMethod · 0.45
_calc_ctc_lossMethod · 0.45
_calc_lm_lossMethod · 0.45
forward_one_stepMethod · 0.45
export_forwardFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected