Hi
My model used to perform well with batch size 2, but since someday the loss looks like this with batch size 2(The code and data are the same!).

However, if I change the batch size into 16, the loss curve looks well, but the loss drops much slower than previous training.
The model I used is https://github.com/drsrinathsridhar/xnocs/blob/master/models/SegNet.py
And the loss function was  https://github.com/drsrinathsridhar/tk3dv/blob/2028b5ea77aca3410d9bf794daf14566ac6bf589/tk3dv/ptTools/loaders/GenericImageDataset.py#L78 2
In another scenario, where I used the model for a harder object, the result with batch 2 will always converge to an all-white image(used to perform well), and when changing batch size into 16 the result became right but with high loss.
I’ve been struggled for days to figure out the reason but failed. At first, I thought this is caused by environmental problems but this bug exists in EVERY env. Can anyone give any suggestions?
Lots of thanks!