Answers.Body: <p>This is simply overfitting. The model is performing well on train data but bad on test (unseen) data; you can measure it also by noticing a huge difference between the training accuracy and the validation accuracy. Of course this is not a natural behavior, to solve this you need to apply some data or network modifications in order to avoid overfitting. Some techniques that might help you:</p>
  <ol>
  <li>Reduce network complexity by removing some of the layers if it is complex</li>
  <li>Use <code>Dropout()</code> inside your network</li>
  <li>Apply Regularization</li>
  <li>Check your classes distribution and make a train - dev/test split</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-19T12:05:51.380Z
Answers.LastActivityDate: 2021-07-19T12:05:51.380Z
Answers.UserDisplayName: Mohammed Abed
Body: <p>I have trained a model for four days. I noticed a behaviour quite strange/unnatural.</p>
  <p>During the training, the score and loss look like this:</p>
  <p><a href="https://i.sstatic.net/Z1xxO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Z1xxO.png" alt="enter image description here" /></a></p>
  <p>However, when I see the validation score, I got:</p>
  <p><a href="https://i.sstatic.net/mMoL9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mMoL9.png" alt="enter image description here" /></a></p>
  <p>It seems the model learning by heart at the beginning and not generalise well afterwards. Is this a natural behavior? Maybe it's really not normal and there must be some errors in the code or algorithm? I don't know what to think anymore. Can you help me? What is a good solution?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-21T20:18:21.050Z
Comments.Text: This post was closed as "needs more details or clarity", and I think that's correct. You're just showing us some plots, but you forgot to explain what problem you are trying to solve, which model you're training, how you're training, which learning algorithm you're using, what's your dataset, etc. You may want to edit your post to include all these details.
Comments.UserDisplayName: nbro
Tags: <reinforcement-learning><natural-language-processing>
Title: The model learns well, but the validation decreases over time
UserDisplayName: Alex
ThreadText: # The model learns well, but the validation decreases over time
  
  (Asked by: username_0 on 2021-07-16)
  
  I have trained a model for four days. I noticed a behaviour quite strange/unnatural.
  
  During the training, the score and loss look like this:
  
  [![enter image description here](https://i.sstatic.net/Z1xxO.png)](https://i.sstatic.net/Z1xxO.png)
  
  However, when I see the validation score, I got:
  
  [![enter image description here](https://i.sstatic.net/mMoL9.png)](https://i.sstatic.net/mMoL9.png)
  
  It seems the model learning by heart at the beginning and not generalise well afterwards. Is this a natural behavior? Maybe it's really not normal and there must be some errors in the code or algorithm? I don't know what to think anymore. Can you help me? What is a good solution?
  
  **Tags:** reinforcement-learning, natural-language-processing
  > **Comments:**
  > **username_1**: This post was closed as "needs more details or clarity", and I think that's correct. You're just showing us some plots, but you forgot to explain what problem you are trying to solve, which model you're training, how you're training, which learning algorithm you're using, what's your dataset, etc. You may want to edit your post to include all these details.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-07-19. Score: 1 | Accepted answer
  
  This is simply overfitting. The model is performing well on train data but bad on test (unseen) data; you can measure it also by noticing a huge difference between the training accuracy and the validation accuracy. Of course this is not a natural behavior, to solve this you need to apply some data or network modifications in order to avoid overfitting. Some techniques that might help you:
  
  1. Reduce network complexity by removing some of the layers if it is complex
  2. Use `Dropout()` inside your network
  3. Apply Regularization
  4. Check your classes distribution and make a train - dev/test split
  
  
  ---
  
  