def configure_optimizers(self) -> tuple[list[LightningOptimizer], list[LRScheduler]]:
        """Configure optimizers and learning rate schedulers.

        Returns:
            tuple[list[LightningOptimizer], list[LRScheduler]]: Tuple containing:
                - List of optimizers (Adam with initial lr=1e-3)
                - List of schedulers (LinearLR reducing to 0.4 over 25000 steps)
        """
        # Optimizer
        # values used in paper: bottle: 0.0001128999, cable: 0.0016160391, capsule: 0.0012118892, carpet: 0.0012118892,
        # grid: 0.0000362248, hazelnut: 0.0013268899, leather: 0.0006124724, metal_nut: 0.0008148858,
        # pill: 0.0010756100, screw: 0.0004155987, tile: 0.0060457548, toothbrush: 0.0001287313,
        # transistor: 0.0011212904, wood: 0.0002466546, zipper: 0.0000455247
        optimizer = torch.optim.Adam([{"params": self.parameters(), "initial_lr": 1e-3}], lr=1e-3, weight_decay=1e-5)

        # Scheduler for slowly reducing learning rate
        scheduler = torch.optim.lr_scheduler.LinearLR(
            optimizer,
            start_factor=1.0,
            end_factor=0.4,
            total_iters=25000,
        )
        return [optimizer], [scheduler]
Configure optimizers and learning rate schedulers.

        Returns:
            tuple[list[LightningOptimizer], list[LRScheduler]]: Tuple containing:
                - List of optimizers (Adam with initial lr=1e-3)
                - List of schedulers (LinearLR reducing to 0.4 over 25000 steps)
        
src/anomalib/models/image/uflow/lightning_model.py