class_docstr: Lightning module which trains an MLP until convergence.
class_docstr_tok: ["Lightning","module","which","trains","an","MLP","until","convergence","."]
code: def __init__(
      self, model: nn.Module, loss: nn.Module, weight_decay: float = 0.0
  ):
      super().__init__()
  
      self.model = model
      self.loss = loss
      self.weight_decay = weight_decay
      self.uses_ranking = isinstance(self.loss, ListMLELoss)
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/surrogate/torch/mlp_lightning_module.py
imports: from typing import List, Tuple
  import pytorch_lightning
  import torch
  from pytorch_lightning.callbacks import Callback, EarlyStopping
  from torch import nn, optim
  from .losses import ListMLELoss
label_desc: Use image node_id 1 to create a new MLPLightningModule object from inherited base classes: pl with example: obj = MLPLightningModule(model, loss, weight_decay)