Answers.Body: <p>For simplicity following your example where there're two input features <span class="math-container">$x_1$</span> (big eyes) and <span class="math-container">$x_2$</span> (small legs), and suppose you also have two neurons in the hidden layer.</p>
  <p>The first neuron in the hidden layer performs the following two steps. It calculates the sum of the inputs multiplied by their weights with bias (an additional offset parameter) as <span class="math-container">$z_1=w_{11}x_1+w_{21}x_2+b_1$</span>, and then applies an activation function such as the popular ReLU to <span class="math-container">$z_1$</span> to introduce non-linearity as <span class="math-container">$a_1=ReLU(z_1)=\max(0,z_1)$</span>. The output of this activation function <span class="math-container">$a_1$</span> is passed to the next layer, for example, another hidden layer or the output layer. Similarly for the second neuron you have  <span class="math-container">$z_2=w_{12}x_1+w_{22}x_2+b_2, a_2=ReLU(z_2)=\max(0,z_2)$</span>. Here the weights determine how much influence each input feature has on a specific neuron of the hidden layer with respect to the final output layer's prediction.</p>
  <p>Later to train the neural network model via <a href="https://en.wikipedia.org/wiki/Backpropagation" rel="nofollow noreferrer">backpropagation</a>, all the above weights and biases need to be initialized randomly since the model doesn’t know anything about your data at the beginning. During your supervised training, backpropagation with gradient descent will adjust these weights and biases so that the predictions become more accurate over time. After training on your labeled training data, the network might learn that feature <span class="math-container">$x_1$</span> (big eyes) is more important for identifying cats and adjust its weights with the two hidden neuron's (<span class="math-container">$w_{11},w_{12}$</span>) accordingly.</p>
  <p>As a beginner perhaps backpropagation method used in training is the hardest part, you may review it carefully and practice with some simple examples first.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-01T06:35:52.013Z
Answers.LastActivityDate: 2024-12-01T06:35:52.013Z
Answers.UserDisplayName: cinch
Body: <p>I am beginner learning Neural network and I taking my first class about this topic and i did not understand how  really it work, I can understand Each neuron has its own unique set of weights that determines how much importance it gives to each feature. By combining the information from all the neurons in the hidden layer, the neural network can make accurate predictions.</p>
  <p>but my question is &gt; how can i determine a set of weight?</p>
  <p>for example if i want to create a neuronal network who can detect if an imagine is a cat o  dog then  I have two input  every input(neuron) have a value :(input 1) big eyes and *(2 input )small legs (because i want teach my neuronal network what is a cat and what is not a cat) then i gave two value to my two neuron(input 1 and 2) then i would like to know how the weight  works and process my value given in my first input in the hidden layer?</p>
  <p>I understand  the set of weight that determine how much importance it give to each feature  by combining the info from all the neuron in the hidden layer but what value is given in the first neuron? and what weight is given in the hidden layer?  I saw something called Random initialization but i don't understand it very well , can someone explain to me that and how that work with the value given in the input?</p>
  <p>thank you  for your time , I am beginner.</p>
  
Tags: <neural-networks><weights-initialization><neurons>
Title: What is a set of weights in a hidden layer and how does it work?
UserDisplayName: TomRiver
ThreadText: # What is a set of weights in a hidden layer and how does it work?
  
  (Asked by: username_0 on 2024-12-01)
  
  I am beginner learning Neural network and I taking my first class about this topic and i did not understand how really it work, I can understand Each neuron has its own unique set of weights that determines how much importance it gives to each feature. By combining the information from all the neurons in the hidden layer, the neural network can make accurate predictions.
  
  but my question is > how can i determine a set of weight?
  
  for example if i want to create a neuronal network who can detect if an imagine is a cat o dog then I have two input every input(neuron) have a value :(input 1) big eyes and \*(2 input )small legs (because i want teach my neuronal network what is a cat and what is not a cat) then i gave two value to my two neuron(input 1 and 2) then i would like to know how the weight works and process my value given in my first input in the hidden layer?
  
  I understand the set of weight that determine how much importance it give to each feature by combining the info from all the neuron in the hidden layer but what value is given in the first neuron? and what weight is given in the hidden layer? I saw something called Random initialization but i don't understand it very well , can someone explain to me that and how that work with the value given in the input?
  
  thank you for your time , I am beginner.
  
  **Tags:** neural-networks, weights-initialization, neurons
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-12-01. Score: 1
  
  For simplicity following your example where there're two input features $x\_1$ (big eyes) and $x\_2$ (small legs), and suppose you also have two neurons in the hidden layer.
  
  The first neuron in the hidden layer performs the following two steps. It calculates the sum of the inputs multiplied by their weights with bias (an additional offset parameter) as $z\_1=w\_{11}x\_1+w\_{21}x\_2+b\_1$, and then applies an activation function such as the popular ReLU to $z\_1$ to introduce non-linearity as $a\_1=ReLU(z\_1)=\max(0,z\_1)$. The output of this activation function $a\_1$ is passed to the next layer, for example, another hidden layer or the output layer. Similarly for the second neuron you have $z\_2=w\_{12}x\_1+w\_{22}x\_2+b\_2, a\_2=ReLU(z\_2)=\max(0,z\_2)$. Here the weights determine how much influence each input feature has on a specific neuron of the hidden layer with respect to the final output layer's prediction.
  
  Later to train the neural network model via [backpropagation](https://en.wikipedia.org/wiki/Backpropagation), all the above weights and biases need to be initialized randomly since the model doesn’t know anything about your data at the beginning. During your supervised training, backpropagation with gradient descent will adjust these weights and biases so that the predictions become more accurate over time. After training on your labeled training data, the network might learn that feature $x\_1$ (big eyes) is more important for identifying cats and adjust its weights with the two hidden neuron's ($w\_{11},w\_{12}$) accordingly.
  
  As a beginner perhaps backpropagation method used in training is the hardest part, you may review it carefully and practice with some simple examples first.
  
  
  ---
  
  