Answers.Body: <p>Hello and welcome to the community. There are multiple ways you can train a neural network: <strong>stochastic, mini-batch and batch</strong>. What you explained is the stochastic mode, where you input one training example 01 for example, calculate the gradients and update the networks weights before the next training example is fed. You could also select multiple such examples (a mini-batch) and update the weights only after you computed all the outputs (for this particular mini-batch). Finally you can use a batch size which is equal with the total number of examples in your dataset so you will update the weights only after you have all the outputs for all samples. Each of those methods have their own strengths and weaknesses, depending on your dataset you might prefer one over the others.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-03T09:22:47.290Z
Answers.LastActivityDate: 2019-12-03T09:22:47.290Z
Answers.UserDisplayName: razvanc92
Body: <p>Let's suppose we have to train a neural network for the XOR classification task.</p>
  
  <p>Are the inputs <span class="math-container">$(00, 01, 10, 11)$</span> inserted in a sequential way? For example, we first insert the 00 and change the weights, then the 01 and again slightly change them, etc. Or is there another way it can be implemented?</p>
  
Tags: <neural-networks><machine-learning><classification><training>
Title: How are the inputs passed to the neural network during training for the XOR classification task?
UserDisplayName: Cand3
ThreadText: # How are the inputs passed to the neural network during training for the XOR classification task?
  
  (Asked by: username_0 on 2019-12-03)
  
  Let's suppose we have to train a neural network for the XOR classification task.
  
  Are the inputs $(00, 01, 10, 11)$ inserted in a sequential way? For example, we first insert the 00 and change the weights, then the 01 and again slightly change them, etc. Or is there another way it can be implemented?
  
  **Tags:** neural-networks, machine-learning, classification, training
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-03. Score: 1 | Accepted answer
  
  Hello and welcome to the community. There are multiple ways you can train a neural network: **stochastic, mini-batch and batch**. What you explained is the stochastic mode, where you input one training example 01 for example, calculate the gradients and update the networks weights before the next training example is fed. You could also select multiple such examples (a mini-batch) and update the weights only after you computed all the outputs (for this particular mini-batch). Finally you can use a batch size which is equal with the total number of examples in your dataset so you will update the weights only after you have all the outputs for all samples. Each of those methods have their own strengths and weaknesses, depending on your dataset you might prefer one over the others.
  
  
  ---
  
  