hiqmat_nisa1:

Thanks for the reply. I am using only One layer BLSTM. First, I have tried 2 BLSTM layers in encoder, it was worse then 1 layer BLSTM.


No problem - good that you checked different numbers of layers in BLSTM! If you have the choice of changing architectures, using transformers instead of BLSTM would likely perform much better in this case - though implementation can be a bit more difficult. However, I understand that sometimes we don’t have that choice 



 hiqmat_nisa1:

So how we can be sure that the particualr problem is overfitting problem? As from the graph the validation loss is not increasing.


Generally, if you are getting convergence on the training loss, but validation loss does not converge (in this case we see it increasing and decreasing rapidly), then your model is likely overfitting to the training dataset. (Assuming validation loss is being calculated correctly - which it is always good to double check lol.)
In terms of reducing model complexity, I would suggest you start by removing this layer:
    self.layer2 = nn.Sequential(
            nn.Conv2d(32, 64, kernel_size=(3,3),stride =(1,1), padding=1),
            nn.ReLU(),
            nn.BatchNorm2d(64),
            nn.MaxPool2d(2,2)
            )

and maybe even removing this layer as well:
    self.layer1 = nn.Sequential(
            nn.Conv2d(8, 32, kernel_size=(3,3),stride =(1,1), padding=1),
            nn.ReLU(),
            nn.BatchNorm2d(32),
            nn.MaxPool2d(2,2),
            )




 hiqmat_nisa1:

secondly, What does these spikes actaully represents? Why we are getting these spikes?


In this case, I suspect the spike could be an indication that your Learning Rate α is a bit too large. (Learning rates that are too big will cause the gradient to explode during backpropagation, causing the training loss to oscillate.) In some cases however, seeing many small spikes in the training loss could simply be a result of optim.Adam using mini-batch 7. Perhaps try using different batch_sizes if reducing model complexity doesn’t help