aac_metrics.classes.spice module

class SPICE(
return_all_scores: bool = True,
*,
cache_path: str | Path | None = None,
java_path: str | Path | None = None,
tmp_path: str | Path | None = None,
n_threads: int | None = None,
java_max_memory: str = '8G',
timeout: None | int | Iterable[int] = None,
separate_cache_dir: bool = True,
use_shell: bool | None = None,
verbose: int = 0,
)[source]

Bases: AACMetric[tuple[SPICEScores, SPICEScores] | Tensor]

Semantic Propositional Image Caption Evaluation class.

For more information, see spice().

compute() tuple[SPICEScores, SPICEScores] | 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.

full_state_update: ClassVar[bool | None] = False
get_output_names() tuple[str, ...][source]
higher_is_better: ClassVar[bool | None] = True
is_differentiable: ClassVar[bool | None] = False
max_value: ClassVar[float] = 1.0
min_value: ClassVar[float] = 0.0
reset() None[source]
training: bool
update(
candidates: list[str],
mult_references: list[list[str]],
) None[source]