Schedule_lr_decay function

Hi, my learning_rate formula is

learning_rate = 1/(1+(decay_rate*epoch_num/time_interval))*learning_rate0

When run, I got the result
Original learning rate: 0.5
Updated learning rate after 10 epochs: 0.4854368932038835
Updated learning rate after 100 epochs: 0.3846153846153846

However, the expected output is
Original learning rate: 0.5
Updated learning rate after 10 epochs: 0.5
Updated learning rate after 100 epochs: 0.3846153846153846

What did I wrong, the rate for 100 epochs is correct but the 10 epochs is wrong

Thanks very much

you are missing the floor operation

1 Like

got it. Thanks very much

1 Like