CountScoreConsumer

class CountScoreConsumer[source]

Bases: ScoreConsumer

A simple consumer which counts the number of batches and scores.

Initialize the consumer.

Methods Summary

__call__(batch, target, scores)

Consume scores for the given hr_batch.

Methods Documentation

__call__(batch, target, scores)[source]

Consume scores for the given hr_batch.

Return type:

None

Parameters:
  • batch (LongTensor) –

  • target (Literal['head', 'relation', 'tail']) –

  • scores (FloatTensor) –