class_docstr: Tests different learning rate schedules .
class_docstr_tok: ["Tests","different","learning","rate","schedules","."]
docstr: Test constant schedule works correctly.
docstr_tok: ["Test","constant","schedule","works","correctly","."]
code: def test_constant(self):
      """Test constant schedule works correctly."""
      config = ml_collections.ConfigDict(
          dict(
              lr_configs={
                  "learning_rate_schedule": "compound",
                  "factors": "constant",
                  "base_learning_rate": 0.1,
              }
          )
      )
      lr_fn = lr_schedules.get_learning_rate_fn(config)
      config = config.lr_configs
      for step in range(400):
          expected_learning_rate = config.base_learning_rate
          self.assertAlmostEqual(lr_fn(step), expected_learning_rate)
  
file_path: scenic/scenic/train_lib/tests/test_lr_schedules.py
imports: from absl.testing import absltest
  import ml_collections
  from scenic.train_lib import lr_schedules
  import tensorflow
label_desc: Use image node_id 1 for calling the LearningRateScchedulesTest obj's underlying member method code with example usage: obj.test_constant() without return types