LSTM convergence

DrunkAlex: <p>Hello All!</p>
<p>I am working on the task of univariate time series prediction. I have 2 cases:</p>
<ol>
<li>First case, when I use already prepared test data (sequence of observations) to predict value at next time step.</li>
<li>Second case, when I use predicted values as input to predict value at the next time step. E.g. I use [x1, x2, x3] to predict x4, at next time step I will use [x2, x3, x4] to predict x5, and so on. Values after x3 are prediction, not from test data.</li>
</ol>
<p>For the first case everything is working fine, prediction are appropriate.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/1/b1556a9742405b72684015fae117542ed4a7b39d.png" data-download-href="https://discuss.pytorch.org/uploads/default/b1556a9742405b72684015fae117542ed4a7b39d" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/1/b1556a9742405b72684015fae117542ed4a7b39d_2_400x200.png" alt="image" data-base62-sha1="piLvZv5tJrMn8rmG22g3QTtBwsd" width="400" height="200" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/1/b1556a9742405b72684015fae117542ed4a7b39d_2_400x200.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/1/b1556a9742405b72684015fae117542ed4a7b39d_2_600x300.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/b/1/b1556a9742405b72684015fae117542ed4a7b39d_2_800x400.png 2x" data-dominant-color="F8F7F5"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">870×426 91.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>But when I use predicted values It does not converges. Despite first few values a close to real ones.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/e/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405.png" data-download-href="https://discuss.pytorch.org/uploads/default/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405_2_400x200.png" alt="image" data-base62-sha1="AfvhJVBeva1p1M9qkCnxOP1Xlk1" width="400" height="200" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405_2_400x200.png, https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405_2_600x300.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe0ef09f1c0cb4bef69fef0e1203b20a696e6405_2_800x400.png 2x" data-dominant-color="FDF8F4"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">888×435 70.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I checked several times the types of input and they are all the same.<br>
Guys, I really need your help!</p>