# Assertion error with Exercise 8

**URL:** <https://community.deeplearning.ai/t/assertion-error-with-exercise-8/106980>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [March 9, 2022, 1:30pm UTC](https://community.deeplearning.ai/t/assertion-error-with-exercise-8/106980 "2022-03-09T13:30:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAYEPROKASH\_Dishanan](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@JAYEPROKASH\_Dishanan](https://community.deeplearning.ai/u/JAYEPROKASH_Dishanan)\
**Post date:** [March 9, 2022, 1:30pm UTC](https://community.deeplearning.ai/t/assertion-error-with-exercise-8/106980/1 "2022-03-09T13:30:24Z")

</div>

## Original learning rate: 0.5 Updated learning rate after 10 epochs: 0.4854368932038835 Updated learning rate after 100 epochs: 0.3846153846153846

AssertionError Traceback (most recent call last)  
 in   
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)  
287  
288 assert np.isclose(output\_1, expected\_output\_1),f"output: {output\_1} expected: {expected\_output\_1}"  
 → 289 assert np.isclose(output\_2, expected\_output\_2),f"output: {output\_2} expected: {expected\_output\_2}"  
290  
291 learning\_rate = 0.3

AssertionError: output: 0.45454545454545453 expected: 0.5

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [March 9, 2022, 5:04pm UTC](https://community.deeplearning.ai/t/assertion-error-with-exercise-8/106980/2 "2022-03-09T17:04:08Z")

</div>

You should compute the `floor` of the division operation for the last term in the denoninator. Using `/` does floating point division. To perform the floor operation, use either `//` or `numpy.floor`.
