Hi everyone,
I was doing the programming exercise and now I am stuck as the output is correct but the test case is failing me. Here is my code
# YOUR CODE STARTS HERE
if epoch_num % time_interval == 0:
learning_rate = (1 / (1 + decay_rate) * (epoch_num / time_interval)) * learning_rate
Original learning rate: 0.5
Updated learning rate after 10 epochs: 0.5
Updated learning rate after 100 epochs: 0.3846153846153846
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-25-1b8d727c069a> in <module>
11 print("Updated learning rate after {} epochs: ".format(epoch_num_2), learning_rate_2)
12
---> 13 schedule_lr_decay_test(schedule_lr_decay)
~/work/release/W2A1/public_tests.py in schedule_lr_decay_test(target)
301
302
--> 303 assert np.isclose(output_1, expected_output_1),f"output: {output_1} expected: {expected_output_1}"
304 assert np.isclose(output_2, expected_output_2),f"output: {output_2} expected: {expected_output_2}"
305
AssertionError: output: 2.4 expected: 0.085714285
Expected output
Original learning rate: 0.5
Updated learning rate after 10 epochs: 0.5
Updated learning rate after 100 epochs: 0.3846153846153846
Help is appreciated
Thanks