Rate Controllers

ConstantRateController

class sconce.rate_controllers.ConstantRateController(learning_rate, drop_factor=0.1, movement_key='training_loss', movement_threshold=0.25, movement_window=None, num_drops=0)[source]

A Learning rate that is constant. It can adjust its learning rate by <drop_factor> up to <num_drops> times based on detecting that some metric or loss has stopped moving.

CosineRateController

class sconce.rate_controllers.CosineRateController(max_learning_rate, min_learning_rate=None)[source]

A learning rate that follows a scaled and shifted cosine function from [0, pi/2]. It will begin at <max_learning_rate> and end at <min_learning_rate>, after <num_steps>.

ExponentialRateController

class sconce.rate_controllers.ExponentialRateController(min_learning_rate, max_learning_rate, stop_factor=None, loss_key='training_loss')[source]

A Learning rate that rises exponentially from <min_learning_rate> to <max_learning_rate>, over <num_steps>.

LinearRateController

class sconce.rate_controllers.LinearRateController(min_learning_rate, max_learning_rate, stop_factor=None, loss_key='training_loss')[source]

A Learning rate that rises linearly from <min_learning_rate> to <max_learning_rate>, over <num_steps>.

StepRateController

class sconce.rate_controllers.StepRateController(max_learning_rate, min_learning_rate, num_drops=1)[source]

A Learning Rate that falls in <num_drops> drops from <max_learning_rate> to <min_learning_rate> over the course of <num_steps>. The Learning Rate is constant between drops.

TriangleRateController

class sconce.rate_controllers.TriangleRateController(min_learning_rate, max_learning_rate)[source]

A Learning Rate that rises linearly from <min_learning_rate> to <max_learning_rate>, over <num_steps>/2 then drops linearly back to <min_learning_rate> over the remaining <num_steps>/2.