Why my network is not learning at all

username: dato_nefaridze
cooked: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/0/3/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134.png" data-download-href="https://discuss.pytorch.org/uploads/default/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/0/3/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134_2_690x389.png" alt="image" data-base62-sha1="sY7yuMvJaY6AuKnwcKOOWkkUD2" width="690" height="389" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/0/3/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134_2_690x389.png, https://discuss.pytorch.org/uploads/default/optimized/3X/0/3/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134_2_1035x583.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/0/3/03465573bf5a09e3e5a4f1ef6c0995dcca6d6134.png 2x" data-dominant-color="272727"><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">1360×768 39.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>  it is my network why it is not working? i mean it outputs same values all the time. i am training 50x50x3 images and then formatting them to  50x50 grayscale.as a loss function i am using f.nll_loss as a optimizer i am using adam.this code works <div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/9/79a22cd25800fb880b9432447363c9b6daac8eaa.png" data-download-href="https://discuss.pytorch.org/uploads/default/79a22cd25800fb880b9432447363c9b6daac8eaa" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/7/9/79a22cd25800fb880b9432447363c9b6daac8eaa_2_690x389.png" alt="image" data-base62-sha1="hm1epv6yI02htnCYHLZHBH6BVd8" width="690" height="389" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/7/9/79a22cd25800fb880b9432447363c9b6daac8eaa_2_690x389.png, https://discuss.pytorch.org/uploads/default/optimized/3X/7/9/79a22cd25800fb880b9432447363c9b6daac8eaa_2_1035x583.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/7/9/79a22cd25800fb880b9432447363c9b6daac8eaa.png 2x" data-dominant-color="272827"><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">1360×768 53 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>  it is copy from sendtex’s tutorials.</p>

username: ptrblck
cooked: <p>Could you post the training code (wrapping it in three backticks ```), so that we can have a look?<br>
I’m a bit skeptical about the usage of <code>softmax</code> at the end of your model, since your model looks like a classification model and the vanilla loss functions would be <code>nn.CrossEntropyLoss</code> or <code>nn.NLLLoss</code>, which don’t expect softmax outputs.</p>