Thanks for the fast reply!
Since I didn’t use any dropout, I guess something about my calculation is very off.
In the end I thought calculating how far off my resulting images are from the groundtruth by using L1 and L2 distance per Voxel as such example (in order to be able to compare statistics of different images, with different sizes, to each other):
Image groundtruth g
Image output o
–> images as numpy arrays:
abs_difference = np.absolute(g-o)
l1 = np.mean(abs_difference)
l2 = np.sqrt(np.mean(abs_difference*abs_difference))
If my idea is completely off, please tell me.
So now I switched to L1Loss, because I realized my mistake and MSELoss will not work per voxel if I don’t want to implement my own loss function (should have realized that earlier).
Still with L1Loss and reduction=‘sum’, and summing all losses of one epoch, then dividing them by (‘number of training or validation patches’ times ‘number of voxels per patch’) gives me a loss twice as high for training than validation in the beginning. Is this problematic? It is becoming better fast though (similar values for training and validation).