def configure_optimizers(self) -> Optimizer:
        """Configure optimizers for each decoder.

        Creates an Adam optimizer for all decoder parameters with the specified
        learning rate.

        Returns:
            Optimizer: Adam optimizer instance configured for the decoders.
        """
        decoders_parameters = []
        for decoder_idx in range(len(self.model.pool_layers)):
            decoders_parameters.extend(list(self.model.decoders[decoder_idx].parameters()))

        return optim.Adam(
            params=decoders_parameters,
            lr=self.learning_rate,
        )
Configure optimizers for each decoder.

        Creates an Adam optimizer for all decoder parameters with the specified
        learning rate.

        Returns:
            Optimizer: Adam optimizer instance configured for the decoders.
        
src/anomalib/models/image/cflow/lightning_model.py