Skip to content

unitorch.cli.models¤

ClassificationOutputs¤

Bases: TensorsOutputs, WriterMixin

Outputs for classification models.

Parameters:

Name Type Description Default
outputs Tensor

Output tensor containing the classification results.

required

ClassificationTargets¤

Bases: TensorsTargets

Targets for classification models.

Parameters:

Name Type Description Default
targets Tensor

The target tensor.

required
sample_weight Optional[Tensor]

The weight associated with each target. Defaults to a tensor with a value of 1.0.

tensor(1.0)

EmbeddingOutputs¤

Bases: TensorsOutputs, WriterMixin

Outputs for embedding models.

Parameters:

Name Type Description Default
embedding Tensor

The embedding tensor.

required
embedding1 Optional[Tensor]

Additional embedding tensor 1. Defaults to an empty tensor.

empty(0)
embedding2 Optional[Tensor]

Additional embedding tensor 2. Defaults to an empty tensor.

empty(0)
embedding3 Optional[Tensor]

Additional embedding tensor 3. Defaults to an empty tensor.

empty(0)
embedding4 Optional[Tensor]

Additional embedding tensor 4. Defaults to an empty tensor.

empty(0)

GenerationOutputs¤

Bases: TensorsOutputs, WriterMixin

Outputs for generation models.

Parameters:

Name Type Description Default
sequences Tensor

Generated sequences.

required
sequences_scores Optional[Tensor]

Scores associated with the generated sequences. Defaults to an empty tensor.

empty(0)

GenerationTargets¤

Bases: TensorsTargets

Targets for generation models.

Parameters:

Name Type Description Default
refs Tensor

Reference sequences.

required
masks Optional[Tensor]

Mask indicating the valid positions in the reference sequences. Defaults to an empty tensor.

empty(0)
sample_weight Optional[Tensor]

Sample weights for the reference sequences. Defaults to an empty tensor.

empty(0)

LossOutputs¤

Bases: TensorsOutputs