class_docstr: official.nlp.optimization.WarmUp
code: def __call__(self, step):
      with tf.name_scope(self.name or "WarmUp") as name:
          # Implements polynomial warmup. i.e., if global_step < warmup_steps,
          # the learning rate will be
          # `global_step/num_warmup_steps * init_lr`.
          global_step_float = tf.cast(step, tf.float32)
          warmup_steps_float = tf.cast(self.warmup_steps, tf.float32)
          warmup_percent_done = global_step_float / warmup_steps_float
          warmup_learning_rate = (
              self.initial_learning_rate
              * tf.math.pow(warmup_percent_done, self.power)
          )
          return tf.cond(
              global_step_float < warmup_steps_float,
              lambda: warmup_learning_rate,
              lambda: self.decay_schedule_fn(step),
              name=name,
          )
  
imports: from typing import List
  import tensorflow
  from tensorflow import keras
  from tensorflow import nest
  from tensorflow.keras import layers
  from tensorflow.keras.layers.experimental import preprocessing
  from autokeras.utils import data_utils
label_desc: Use image node_id 2 for calling the WarmUp obj's underlying member method code with example usage: obj.__call__(step) and returns: tf