quaterion.eval.accumulators.accumulator module¶
- class Accumulator[source]¶
Bases:
object
Accumulate calculated embeddings and corresponding targets for metrics and evaluators
- update(**kwargs) None [source]¶
Accumulate batch
- Parameters:
for (**kwargs - embeddings and objects required for label calculation. E.g.) –
labels (pair-based tasks it is) –
pairs –
is (subgroups and for group-based tasks it) –
groups. –
- property embeddings¶
Concatenate list of embeddings to Tensor
Help to avoid concatenating embeddings for each batch during accumulation. Instead, concatenate it only on call.
- Returns:
torch.Tensor – batch of embeddings
- property filled: bool¶
State of accumulator
- Returns:
- bool - represents whether accumulator can still accumulate values or it is already
filled