models/MIXER/MLP_MIXER.py
def make_lr_scheduler(self, optm, lr_scheduler_name, lr_decay_rate, warm_restart_T_0=50):
        """
        Make the learning rate scheduler as instructed. More modes can be added to this, current supported ones:
        1. ReduceLROnPlateau (decrease lr when validation error stops improving
        :return:
        """
        if lr_scheduler_name == 'warm_restart':
            return lr_scheduler.CosineAnnealingWarmRestarts(optm, warm_restart_T_0, T_mult=1, eta_min=0, last_epoch=-1, verbose=False) 
        elif lr_scheduler_name == 'reduce_plateau':
            return lr_scheduler_name.ReduceLROnPlateau(optimizer=optm, mode='min',
                                              factor=lr_decay_rate,
                                              patience=10, verbose=True, threshold=1e-4)
        else:
            return None

        Make the learning rate scheduler as instructed. More modes can be added to this, current supported ones:
        1. ReduceLROnPlateau (decrease lr when validation error stops improving
        :return:
        
Make the learning rate scheduler as instructed. More modes can be added to this, current supported ones:
1. ReduceLROnPlateau (decrease lr when validation error stops improving
Make the learning rate scheduler as instructed . More modes can be added to this current supported ones : 1 . ReduceLROnPlateau ( decrease lr when validation error stops improving
def make_lr_scheduler(self, optm, lr_scheduler_name, lr_decay_rate, warm_restart_T_0=50):
        if lr_scheduler_name == 'warm_restart':
            return lr_scheduler.CosineAnnealingWarmRestarts(optm, warm_restart_T_0, T_mult=1, eta_min=0, last_epoch=-1, verbose=False) 
        elif lr_scheduler_name == 'reduce_plateau':
            return lr_scheduler_name.ReduceLROnPlateau(optimizer=optm, mode='min',
                                              factor=lr_decay_rate,
                                              patience=10, verbose=True, threshold=1e-4)
        else:
            return None
def make_lr_scheduler ( self , optm , lr_scheduler_name , lr_decay_rate , warm_restart_T_0 = 50 ) : if lr_scheduler_name == 'warm_restart' : return lr_scheduler . CosineAnnealingWarmRestarts ( optm , warm_restart_T_0 , T_mult = 1 , eta_min = 0 , last_epoch = - 1 , verbose = False ) elif lr_scheduler_name == 'reduce_plateau' : return lr_scheduler_name . ReduceLROnPlateau ( optimizer = optm , mode = 'min' , factor = lr_decay_rate , patience = 10 , verbose = True , threshold = 1e-4 ) else : return None
Make the learning rate scheduler as instructed.
Make the learning rate scheduler as instructed .
"""
        Make the learning rate scheduler as instructed. More modes can be added to this, current supported ones:
        1. ReduceLROnPlateau (decrease lr when validation error stops improving
        :return:
        """
None
self
optm
lr_scheduler_name
lr_decay_rate
warm_restart_T_0