Skip to content
DeepForgeby svx
All problems
EasyOptimizationop-005

Exponential LR Schedule

Problem

Compute the learning rate at a given step using exponential decay:

lr(step) = initial_lr * decay_rate^step

Test cases

case 1
in: [0.1,0.95,10]
expected: 0.05987369392368379
case 2
in: [0.01,0.9,0]
expected: 0.01
case 3
in: [1,0.5,5]
expected: 0.03125
case 4
in: [0.1,1,100]
expected: 0.1
Starter codePython
def exponential_lr_schedule(initial_lr, decay_rate, step):
    # Your code here
    pass

4 test cases · run your code against them in the editor