I am making a simple ANN model in pytorch i am using SGD optimizer with learining rate 3e-4 this got me an test accuracy around 79 to 80 % but when i changed it to Adam optimizer and again to SGD and ran my code it gave me test accuracy of 66% why is that and how can i fix it?
Hi, do I understand correctly that you trained your network first using SGD and then trained the second one using first Adam optimizer and then fine tuned using SGD optimizer? Or you trained both networks using just SGD optimizers?
Also, do you set torch.manual_seed()? As far as I know it is also necessary to set torch.backends.cudnn.deterministic = True and torch.backends.cudnn.benchmark = False for full reproducibility.