aac_metrics.classes.fense module¶
- class FENSE(
- return_all_scores: bool =
True, - *,
- sbert_model: str | SentenceTransformer =
'paraphrase-TinyBERT-L6-v2', - echecker: str | BERTFlatClassifier =
'echecker_clotho_audiocaps_base', - echecker_tokenizer: AutoTokenizer | None =
None, - error_threshold: float =
0.9, - device: str | device | None =
'cuda_if_available', - batch_size: int | None =
32, - reset_state: bool =
True, - return_probs: bool =
False, - penalty: float =
0.9, - verbose: int =
0, Bases:
AACMetric[tuple[FENSEScores,FENSEScores] |Tensor]Fluency ENhanced Sentence-bert Evaluation (FENSE)
Original implementation: https://github.com/blmoistawinde/fense
For more information, see
fense().- compute() tuple[FENSEScores, FENSEScores] | Tensor[source]¶
- extra_repr() str[source]¶
Return the extra representation of the module.
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
- update(
- candidates: list[str],
- mult_references: list[list[str]],