# Course 2 week 1 accuracy

**URL:** <https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869>\
**Category:** Convolutional Neural Networks in TensorFlow\
**Tags:** week-module-1\
**Created:** [October 7, 2022, 1:48pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869 "2022-10-07T13:48:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorrad](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jorrad](https://community.deeplearning.ai/u/Jorrad)\
**Post date:** [October 7, 2022, 1:48pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/1 "2022-10-07T13:48:30Z")

</div>

I’m sorry for posting the code but I needed you to see my model. I’m supposed to get a 95% accuracy in order to pass the assignment however I keep hitting below. I dont know what I’m doing wrong

[code removed - moderator]

---

<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:** [October 7, 2022, 5:15pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/2 "2022-10-07T17:15:35Z")

</div>

Does this [thread](https://community.deeplearning.ai/t/assignment-accuracy/212727) help?

---

<div class="post-metadata">

**Author:** ![Jorrad](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jorrad](https://community.deeplearning.ai/u/Jorrad)\
**Post date:** [October 7, 2022, 6:57pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/3 "2022-10-07T18:57:58Z")

</div>

I changed the optimizer to Adam and I was able to get the accuracy to \>95%. however other people taking the course were able to achieve that using RMSprop. I wonder why

---

<div class="post-metadata">

**Author:** ![Osama\_Saad\_Farouk](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/osama_saad_farouk/32/32413_2.png) [@Osama\_Saad\_Farouk](https://community.deeplearning.ai/u/Osama_Saad_Farouk)\
**Post date:** [October 12, 2022, 9:45pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/4 "2022-10-12T21:45:19Z")

</div>

Experiment with using more dense layers or more convolutional layers, both can help but if you use a maximum of 5 convolutions then try to make three dense layers of 1024,512,256 units and then use you last dense layer as it is.

---

<div class="post-metadata">

**Author:** ![jordi\_m\_p](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jordi_m_p/32/13045_2.png) [@jordi\_m\_p](https://community.deeplearning.ai/u/jordi_m_p)\
**Post date:** [October 13, 2022, 3:41pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/5 "2022-10-13T15:41:48Z")

</div>

Hi!  
I am having a similar issue.  
I have 5 convolutional layers, 3 dense layers, but still I am getting

accuracy: 0.8768 - val\_accuracy: 0.9036

I set 15 epochs and batch size 15 and I have the optimizer RMSprop.

What else could I look at? Number of filters? I have 32, 64, 64, 128 and 128 …

---

<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:** [October 13, 2022, 7:09pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/6 "2022-10-13T19:09:18Z")

</div>

Did you explore the link from my previous post?

---

<div class="post-metadata">

**Author:** ![Osama\_Saad\_Farouk](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/osama_saad_farouk/32/32413_2.png) [@Osama\_Saad\_Farouk](https://community.deeplearning.ai/u/Osama_Saad_Farouk)\
**Post date:** [October 14, 2022, 4:17pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/7 "2022-10-14T16:17:24Z")

</div>

for the DNN try this architecture:  
1024units followed by 512 units then a 256 units layer then you output layer,  
if your accuracy is still not very high then look for how to improve your augmentation, this will make help your accuracy to be a lot higher

---

<div class="post-metadata">

**Author:** ![jordi\_m\_p](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jordi_m_p/32/13045_2.png) [@jordi\_m\_p](https://community.deeplearning.ai/u/jordi_m_p)\
**Post date:** [October 14, 2022, 4:47pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/8 "2022-10-14T16:47:19Z")

</div>

I did.  
After few attemps, changing the learning rate to 0.0001 for RMSprop optimizer did the trick 🙂 .

---

<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:** [October 14, 2022, 4:53pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/9 "2022-10-14T16:53:55Z")

</div>

`1e-4` is very small for a learning rate. How many trainable parameters does your model have?

---

<div class="post-metadata">

**Author:** ![Osama\_Saad\_Farouk](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/osama_saad_farouk/32/32413_2.png) [@Osama\_Saad\_Farouk](https://community.deeplearning.ai/u/Osama_Saad_Farouk)\
**Post date:** [October 14, 2022, 8:39pm UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/10 "2022-10-14T20:39:00Z")

</div>

very well, good luck 🙂

---

<div class="post-metadata">

**Author:** ![Sean\_Song](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Sean\_Song](https://community.deeplearning.ai/u/Sean_Song)\
**Post date:** [October 16, 2022, 1:47am UTC](https://community.deeplearning.ai/t/course-2-week-1-accuracy/215869/11 "2022-10-16T01:47:47Z")

</div>

Mine worked with this model so hopefully this works

I have set the training batch size to 100 and validation batch size to 20

[code removed - moderator]
