class_docstr: Plugin for LinearSchedulerWithWarmup.
class_docstr_tok: ["Plugin","for","LinearSchedulerWithWarmup","."]
docstr: Initialize different schedulers, including anneal target for AnnealOnPlateau, batch_growth_annealing, loading schedulers.
docstr_tok: ["Initialize","different","schedulers",",","including","anneal","target","for","AnnealOnPlateau",",","batch_growth_annealing",",","loading","schedulers","."]
code: def after_setup(
      self,
      dataset_size,
      mini_batch_size,
      max_epochs,
      **kwargs,
  ):
      """Initialize different schedulers, including anneal target for AnnealOnPlateau, batch_growth_annealing, loading schedulers."""
      # calculate warmup steps
      steps_per_epoch = (
          dataset_size + mini_batch_size - 1
      ) / mini_batch_size
      num_train_steps = int(steps_per_epoch * max_epochs)
      num_warmup_steps = int(num_train_steps * self.warmup_fraction)
  
      self.scheduler = LinearSchedulerWithWarmup(
          num_train_steps=num_train_steps,
          num_warmup_steps=num_warmup_steps,
          optimizer=self.trainer.optimizer,
      )
  
      self.store_learning_rate()
  
file_path: flair/flair/trainers/plugins/functional/linear_scheduler.py
imports: import logging
  from typing import Any, Dict
  from flair.optim import LinearSchedulerWithWarmup
  from flair.trainers.plugins.base import TrainerPlugin
label_desc: Use image node_id 3 for calling the LinearSchedulerPlugin obj's underlying member method code with example usage: obj.after_setup(dataset_size, mini_batch_size, max_epochs) without return types