lm_polygraph.utils.ensemble_utils.dropout module

class lm_polygraph.utils.ensemble_utils.dropout.ConsistentDropout(p: float = 0.5, inplace: bool = False)[source]

Bases: Dropout

forward(input: Tensor) Tensor[source]

Runs the forward pass.

forward_share_across_tokens(input: Tensor) Tensor[source]
identity(input: Tensor) Tensor[source]
lm_polygraph.utils.ensemble_utils.dropout.functional_dropout(input: Tensor, p: float = 0.5, training: bool = True, inplace: bool = False) Tensor[source]
lm_polygraph.utils.ensemble_utils.dropout.functional_dropout_share(input: Tensor, p: float = 0.5, training: bool = True, inplace: bool = False) Tensor[source]
lm_polygraph.utils.ensemble_utils.dropout.replace_dropout(model_name, module, p=0.1, share_across_tokens=True)[source]
lm_polygraph.utils.ensemble_utils.dropout.replace_with_identity(module)[source]