class_docstr: Class performing certified adversarial training from methods such as
  
  | Paper link: http://proceedings.mlr.press/v80/mirman18b/mirman18b.pdf
  | Paper link: https://arxiv.org/pdf/1810.12715.pdf
class_docstr_tok: ["Class","performing","certified","adversarial","training","from","methods","such","as","|","Paper","link",":","http",":","\/\/proceedings.mlr.press\/v80\/mirman18b\/mirman18b.pdf","|","Paper","link",":","https",":","\/\/arxiv.org\/pdf\/1810.12715.pdf"]
docstr: Create linear schedulers based on default example values.
  
  :param initial_val: Initial value to begin the scheduler from.
  :param final_val: Final value to end the scheduler at.
  :param epochs: Total number of epochs.
  
  :return: A linear scheduler initialised with default example values.
docstr_tok: ["Create","linear","schedulers","based","on","default","example","values",".",":","param","initial_val",":","Initial","value","to","begin","the","scheduler","from",".",":","param","final_val",":","Final","value","to","end","the","scheduler","at",".",":","param","epochs",":","Total","number","of","epochs",".",":","return",":","A","linear","scheduler","initialised","with","default","example","values","."]
code: def initialise_default_scheduler(
      initial_val: float, final_val: float, epochs: int
  ) -> DefaultLinearScheduler:
      """
      Create linear schedulers based on default example values.
  
      :param initial_val: Initial value to begin the scheduler from.
      :param final_val: Final value to end the scheduler at.
      :param epochs: Total number of epochs.
  
      :return: A linear scheduler initialised with default example values.
      """
      warm_up = int(0.01 * epochs)
      epochs_to_ramp = int(
          0.30 * epochs
      )  # increasing eps from 0 to eps over 30% of the total epochs
      if epochs_to_ramp == 0:
          epochs_to_ramp = 1
  
      step_in_eps_per_epoch = (final_val - initial_val) / epochs_to_ramp
  
      return DefaultLinearScheduler(
          step_per_epoch=step_in_eps_per_epoch,
          initial_val=initial_val,
          final_val=final_val,
          warmup=warm_up,
      )
  
file_path: adversarial-robustness-toolbox/art/defences/trainer/ibp_certified_trainer_pytorch.py
imports: import logging
  import random
  import sys
  import numpy
  from sklearn.utils import shuffle
  from tqdm import tqdm
  from art.defences.trainer.trainer import Trainer
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent import ProjectedGradientDescent
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 2 for calling the AdversarialTrainerCertifiedIBPPyTorch obj's underlying member method code with example usage: obj.initialise_default_scheduler(initial_val, final_val, epochs) and returns: DefaultLinearScheduler