code: def __init__(self, model, train, dev, params):
      self.train, self.dev = train, dev
      self.model = model
      self.params = params
  
      self.trainer_param = getattr(dy, params["trainer"])(
          model.pc_param
      )
      self.trainer_embed = getattr(dy, params["trainer"])(
          model.pc_embed
      )
      self.trainer_param.learning_rate = params["learning_rate_param"]
      self.trainer_embed.learning_rate = params["learning_rate_embed"]
      all_trainers = [self.trainer_param, self.trainer_embed]
      for trainer in all_trainers:
          trainer.set_clip_threshold(-1)
          trainer.set_sparse_updates(params["sparse"])
  
file_path: dynet/examples/treelstm/scheduler.py
imports: import time
  import dynet
  import numpy
  from utils import acc_eval
label_desc: Use image node_id 1 to create a new Scheduler object  with example: obj = Scheduler(model, train, dev, params)