Hi, I think we can’t do too much with this slowness of pytorch in cpu. I had to do some fixes in my code like while using KLDIVLoss as loss function you either use log_softmax as your output activation or do a loss = KLDIVLoss(reduction=‘batchmean’)(output.log(), target) to make sure that you follow the mathematics of KLDIVLoss.
Anyway, for speed up the training and validation, I ended up implementing it for gpu and now it is identical with tensorflow training on GPU.
Thus, all good for now.
@ptrblck thanks for your effort on looking at my issue.