logitorch.models.lreasoner

Classes

LReasoner

Initializes an instance of the LReasoner class.

Module Contents

class logitorch.models.lreasoner.LReasoner(pretrained_model: str)[source]

Bases: torch.nn.Module

Initializes an instance of the LReasoner class.

Args:

pretrained_model (str): The name or path of the pre-trained model to use.

Returns:

None

forward(**x: Dict[str, torch.Tensor]) transformers.modeling_outputs.SequenceClassifierOutput[source]

Performs forward pass through the LReasoner model.

Args:

**x (Dict[str, torch.Tensor]): Input tensors for the model.

Returns:

SequenceClassifierOutput: The output of the model.

predict(**x: Dict[str, torch.Tensor]) List[str][source]

Predicts the class labels for the input tensors.

Args:

**x (Dict[str, torch.Tensor]): Input tensors for prediction.

Returns:

List[str]: The predicted class labels.

model[source]