dgs.models.scheduler.get_scheduler¶
- dgs.models.scheduler.get_scheduler(instance: str | type) Type[torch.optim.lr_scheduler.LRScheduler][source]¶
- Given the name or an instance of a learning-rate scheduler, return the respective instance. - Parameters:
- instance – Either the name of the scheduler, which has to be in - SCHEDULERS, or a subclass of- Scheduler.
- Raises:
- ValueError – If the instance has the wrong type. 
- Returns:
- The class of the given scheduler.