Hi, I would like to know how can be solved the problem to calculate 0.5 instead of 0.4545…
learning_rate = learning_rate0/(1+(decay_rate*(epoch_num/time_interval)))
The following cell failed:
learning_rate = 0.5
print("Original learning rate: ", learning_rate)
epoch_num_1 = 10
epoch_num_2 = 100
decay_rate = 0.3
time_interval = 100
learning_rate_1 = schedule_lr_decay(learning_rate, epoch_num_1, decay_rate, time_in...
learning_rate_2 = schedule_lr_decay(learning_rate, epoch_num_2, decay_rate, time_in...
print("Updated learning rate after {} epochs: ".format(epoch_num_1), learning_rate_...
print("Updated learning rate after {} epochs: ".format(epoch_num_2), learning_rate_...
schedule_lr_decay_test(schedule_lr_decay)
The error was:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-25-1b8d727c069a> in <module>
11 print("Updated learning rate after {} epochs: ".format(epoch_num_2), learni...
12
---> 13 schedule_lr_decay_test(schedule_lr_decay)
~/work/submitted/courseraLearner/W2A1/public_tests.py in schedule_lr_decay_test(tar...
314
315 assert np.isclose(output_1, expected_output_1),f"output: {output_1} exp...
--> 316 assert np.isclose(output_2, expected_output_2),f"output: {output_2} exp...
317
318 learning_rate = 0.3
AssertionError: output: 0.45454545454545453 expected: 0.5
thank you,
MY