Victor_Cross_Zhuang:

Now the problem is the loss function just won’t decrease anymore, instead it goes all over the place. Is there anyway to solve that?


If its jittering all over the place, this could indicate the model isn’t learning at all. But i can’t really see a mistake in the training loop. Maybe you should increase the batch_size in your dataloader, because at first your batch_size was the entire dataset and now its only one at a time.




 Victor_Cross_Zhuang:

Lastly, im definitely sure that my architecture here is not well designed at all, do you have any suggestions?


Well you could make your model deeper (more layer) or wider (more ‘neurons’ per layer), but only if the data really requires a more complex model and if you also have enough data! At first i would leave it as it is.