SquadOutputLayer.ConfigΒΆ

Component: SquadOutputLayer

class SquadOutputLayer.Config[source]

Bases: OutputLayerBase.Config

All Attributes (including base classes)

load_path: Optional[str] = None
save_path: Optional[str] = None
freeze: bool = False
shared_module_key: Optional[str] = None
loss: Union[CrossEntropyLoss.Config, KLDivergenceCELoss.Config] = CrossEntropyLoss.Config()
ignore_impossible: bool = True
pos_loss_weight: float = 0.5
has_answer_loss_weight: float = 0.5
false_label: str = 'False'
max_answer_len: int = 30
hard_weight: float = 0.0

Default JSON

{
    "load_path": null,
    "save_path": null,
    "freeze": false,
    "shared_module_key": null,
    "loss": {
        "CrossEntropyLoss": {}
    },
    "ignore_impossible": true,
    "pos_loss_weight": 0.5,
    "has_answer_loss_weight": 0.5,
    "false_label": "False",
    "max_answer_len": 30,
    "hard_weight": 0.0
}