Skip to content

Text classification example

TextClassificationExample #

Bases: LightningModule

Example of a lightning module used to train a huggingface model for text classification.

configure_optimizers #

configure_optimizers()

Prepare optimizer and schedule (linear warmup and decay)