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

Method softmax

funasr/models/ctc/ctc.py:179–190  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

decodeMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
__call__Method · 0.45
report_coreMethod · 0.45
forwardMethod · 0.45
forward_attentionMethod · 0.45
forward_attentionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected