nnf_ctc_loss {torch} | R Documentation |
Ctc_loss
Description
The Connectionist Temporal Classification loss.
Usage
nnf_ctc_loss(
log_probs,
targets,
input_lengths,
target_lengths,
blank = 0,
reduction = c("mean", "sum", "none"),
zero_infinity = FALSE
)
Arguments
log_probs |
|
targets |
|
input_lengths |
|
target_lengths |
|
blank |
(int, optional) Blank label. Default |
reduction |
(string, optional) – Specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Default: 'mean' |
zero_infinity |
(bool, optional) Whether to zero infinite losses and the
associated gradients. Default: |