# Machine Learning specialization C2\_W1,problem with tensor flow implementation

**URL:** <https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947>\
**Category:** Advanced Learning Algorithms\
**Tags:** week-module-1\
**Created:** [April 20, 2023, 2:44pm UTC](https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947 "2023-04-20T14:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gloryjaw](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@Gloryjaw](https://community.deeplearning.ai/u/Gloryjaw)\
**Post date:** [April 20, 2023, 2:44pm UTC](https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947/1 "2023-04-20T14:44:16Z")

</div>

Hi, I have almost completed week 1 of course 2 from ML Specialization, but there is one thing I do not understand while implementing neural networks. How do they decide as to which type of work done by which neuron. For example, in coffee roasting model, neuron 1 of layer 1 has bad roast region when temp is too low, neuron 2 when time is short and neuron 3 with bad combination of temp and time. My question is that how does it decide as to which neuron to look for which condition because the training data and gradient descent algorithm for all 3 of neurons is same and how does it avoid repetition of condition for neurons?

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [April 20, 2023, 3:06pm UTC](https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947/2 "2023-04-20T15:06:17Z")

</div>

You can not decide before hand which neuron will decide which part of the learning process. It just happens that in this very simple NN you can see each neuron’s indidual contribution.

That being said as a general principle, in such simple NN by intitializing the weights for each neuron to a certain number you may obtain some control of the learning path of that neuron, but its not feasible for larger NNs.

---

<div class="post-metadata">

**Author:** ![Gloryjaw](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@Gloryjaw](https://community.deeplearning.ai/u/Gloryjaw)\
**Post date:** [April 21, 2023, 3:31am UTC](https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947/3 "2023-04-21T03:31:41Z")

</div>

Since all the neurons goes therough the same procedure of gradient descent to find parameters then why do they differ in learning process?

---

<div class="post-metadata">

**Author:** ![Mujassim\_Jamal](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mujassim_jamal/32/53828_2.png) [@Mujassim\_Jamal](https://community.deeplearning.ai/u/Mujassim_Jamal)\
**Post date:** [April 21, 2023, 4:45am UTC](https://community.deeplearning.ai/t/machine-learning-specialization-c2-w1-problem-with-tensor-flow-implementation/311947/4 "2023-04-21T04:45:15Z")

</div>

> [@Gloryjaw](#):
>
> why do they differ in learning process

Since each neuron in a NN receives input from the previous layers, but they may differ in terms of their weights and biases. As the network learns, the weights and biases are adjusted _differently_ to improve the overall performance of the network by minimizing the overall cost function. This means that each neuron may become _specialized_ in certain types of input.

Edited:- You may also refer to this [thread](https://community.deeplearning.ai/t/why-do-nn-nodes-tend-to-specialize-in-their-behavior/310648) and [comment](https://community.deeplearning.ai/t/c2w1-individual-neurons-and-classification/142248/2), which discusses the behavior of neural networks. It could provide additional insight into the topic we are discussing.

Best,  
Mujassim
