NARSequenceLoss.ConfigΒΆ
Component: NARSequenceLoss
-
class
NARSequenceLoss.Config[source] Bases:
ConfigBase
All Attributes (including base classes)
- beta: float =
0.1- assert_valid_targets: bool =
True- label_type: SourceType =
<SourceType.LOG_PROBS: 'log_probs'>- length_type: SourceType =
<SourceType.LOG_PROBS: 'log_probs'>- label_loss: LabelSmoothingLoss.Config = LabelSmoothingLoss.Config()
- length_loss: LabelSmoothingLoss.Config = LabelSmoothingLoss.Config()
- Subclasses
NARSamplewiseSequenceLoss.Config
Default JSON
{
"beta": 0.1,
"assert_valid_targets": true,
"label_type": "log_probs",
"length_type": "log_probs",
"label_loss": {
"beta": 0.1,
"label_loss": {
"NLLLoss": {}
},
"smoothing_loss": {
"UniformRegularizer": {}
}
},
"length_loss": {
"beta": 0.1,
"label_loss": {
"NLLLoss": {}
},
"smoothing_loss": {
"UniformRegularizer": {}
}
}
}