Struct CTCLossOptions¶
Defined in File loss.h
Page Contents
Struct Documentation¶
-
struct
torch::nn
::
CTCLossOptions
¶ Options for the
CTCLoss
module.Example:
CTCLoss model(CTCLossOptions().blank(42).zero_infinity(false).reduction(torch::kSum));
Public Functions
-
auto
blank
(const int64_t &new_blank) -> decltype(*this)¶ blank label. Default
0
.
-
auto
blank
(int64_t &&new_blank) -> decltype(*this)¶
-
const int64_t &
blank
() const noexcept¶
-
int64_t &
blank
() noexcept¶
-
auto
reduction
(const reduction_t &new_reduction) -> decltype(*this)¶ Specifies the reduction to apply to the output. Default: Mean.
-
auto
reduction
(reduction_t &&new_reduction) -> decltype(*this)¶
-
const reduction_t &
reduction
() const noexcept¶
-
reduction_t &
reduction
() noexcept¶
-
auto
zero_infinity
(const bool &new_zero_infinity) -> decltype(*this)¶ Whether to zero infinite losses and the associated gradients.
Default:
false
. Infinite losses mainly occur when the inputs are too short to be aligned to the targets.
-
auto
zero_infinity
(bool &&new_zero_infinity) -> decltype(*this)¶
-
const bool &
zero_infinity
() const noexcept¶
-
bool &
zero_infinity
() noexcept¶
-
auto