Valid Loss increasing instead of decreasing

Gorgen: <p>hello everyone:  For multimodal sentiment classification task, the loss function is NLLLoss(weight=weight, reduction=‘sum’), loss(pred*mask_, target) /torch.sum(self.weight[target]*mask_.squeeze()). The logits is produced by F.log_softmax. Thus, loss function can be regarded as cross entropy loss.</p>
<p>optimizer = optim.Adam(model.parameters(), lr=args.lr, weight_decay=args.l2)</p>
<p>the architecture is composed of different GRU components. (the supplement are included more details)</p>
<p>Excuse me, the first few epochs of valid loss decreased and then continued to rise, the first few epochs of valid accuracy increased, and the jitter decreased later… What is the problem in this situation… What steps should I follow to troubleshoot the error… Is it a model error or something else, thank you all.</p>
<p>Here is the model architectures.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/7/47421cb82b33fbbbe183c91249f4bde5b0ec1e35.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/47421cb82b33fbbbe183c91249f4bde5b0ec1e35" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/7/47421cb82b33fbbbe183c91249f4bde5b0ec1e35_2_690x379.jpeg" alt="image" data-base62-sha1="aanxNnSwO7VHDLkYVtthN1gHj6J" width="690" height="379" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/7/47421cb82b33fbbbe183c91249f4bde5b0ec1e35_2_690x379.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/4/7/47421cb82b33fbbbe183c91249f4bde5b0ec1e35_2_1035x568.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/4/7/47421cb82b33fbbbe183c91249f4bde5b0ec1e35.jpeg 2x" data-dominant-color="F0ECE3"><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">1221×671 121 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><br>
model<br>
CommonsenseGRUModel_bimodal(<br>
(linear_in): Linear(in_features=1024, out_features=300, bias=True)<br>
(norm1a): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)<br>
(norm1b): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)<br>
(norm1c): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)<br>
(norm1d): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)<br>
(norm3a): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)<br>
(norm3b): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)<br>
(norm3c): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)<br>
(norm3d): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)<br>
(dropout): Dropout(p=0.5, inplace=False)<br>
(dropout_rec): Dropout(p=False, inplace=False)<br>
(cs_rnn_f): CommonsenseRNN(<br>
(dropout): Dropout(p=False, inplace=False)<br>
(dialogue_cell): CommonsenseRNNCell(<br>
(g_cell): GRUCell(600, 150)<br>
(p_cell): GRUCell(918, 150)<br>
(r_cell): GRUCell(1218, 150)<br>
(i_cell): GRUCell(918, 150)<br>
(e_cell): GRUCell(750, 450)<br>
(dropout): Dropout(p=False, inplace=False)<br>
(dropout1): Dropout(p=False, inplace=False)<br>
(dropout2): Dropout(p=False, inplace=False)<br>
(dropout3): Dropout(p=False, inplace=False)<br>
(dropout4): Dropout(p=False, inplace=False)<br>
(dropout5): Dropout(p=False, inplace=False)<br>
(attention): SimpleAttention(<br>
(scalar): Linear(in_features=150, out_features=1, bias=False)<br>
)<br>
)<br>
)<br>
(cs_rnn_r): CommonsenseRNN(<br>
(dropout): Dropout(p=False, inplace=False)<br>
(dialogue_cell): CommonsenseRNNCell(<br>
(g_cell): GRUCell(600, 150)<br>
(p_cell): GRUCell(918, 150)<br>
(r_cell): GRUCell(1218, 150)<br>
(i_cell): GRUCell(918, 150)<br>
(e_cell): GRUCell(750, 450)<br>
(dropout): Dropout(p=False, inplace=False)<br>
(dropout1): Dropout(p=False, inplace=False)<br>
(dropout2): Dropout(p=False, inplace=False)<br>
(dropout3): Dropout(p=False, inplace=False)<br>
(dropout4): Dropout(p=False, inplace=False)<br>
(dropout5): Dropout(p=False, inplace=False)<br>
(attention): SimpleAttention(<br>
(scalar): Linear(in_features=150, out_features=1, bias=False)<br>
)<br>
)<br>
)<br>
(sense_gru): GRU(768, 384, bidirectional=True)<br>
(matchatt): MatchingAttention(<br>
(transform): Linear(in_features=900, out_features=900, bias=True)<br>
)<br>
(linear): Linear(in_features=900, out_features=300, bias=True)<br>
(smax_fc): Linear(in_features=300, out_features=7, bias=True)<br>
(linear_in_mixed_feature): Linear(in_features=1408, out_features=300, bias=True)<br>
)</p>

Gorgen: <p>Here is accuracy loss<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/b/cb456b768c6cc5d26e2f87cf43a96f67567e0fff.png" data-download-href="https://discuss.pytorch.org/uploads/default/cb456b768c6cc5d26e2f87cf43a96f67567e0fff" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/c/b/cb456b768c6cc5d26e2f87cf43a96f67567e0fff_2_690x392.png" alt="image" data-base62-sha1="t0dEM9Fo7D5GYxWQLfvJwHMCyzd" width="690" height="392" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/c/b/cb456b768c6cc5d26e2f87cf43a96f67567e0fff_2_690x392.png, https://discuss.pytorch.org/uploads/default/optimized/3X/c/b/cb456b768c6cc5d26e2f87cf43a96f67567e0fff_2_1035x588.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/c/b/cb456b768c6cc5d26e2f87cf43a96f67567e0fff.png 2x" data-dominant-color="F8F7F7"><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">1126×641 139 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>