Sha256: 440e211984d36aaf755b4b412f297b1dc36bf402d5d0e331c846053b5766a1cb
Contents?: true
Size: 418 Bytes
Versions: 57
Compression:
Stored size: 418 Bytes
Contents
module Torch module Optim module LRScheduler class StepLR < LRScheduler def initialize(optimizer, step_size:, gamma: 0.1, last_epoch: -1) @step_size = step_size @gamma = gamma super(optimizer, last_epoch) end def get_lr @base_lrs.map { |base_lr| base_lr * @gamma ** (@last_epoch / @step_size).floor } end end end end end
Version data entries
57 entries across 57 versions & 1 rubygems