I am trying to train an image classifier model using EfficientNetB1 on a custom dataset and I am trying out TensorFlow 2.4 and TensorFlow 2.9. I am using the exact same script with the same optimizer, augmentation, parameters, and dataset. I ran training 5 times and the results are around the same.
Results:
- TensorFlow 2.4: ~97-98% Accuracy on the validation set.
- TensorFlow 2.9: ~93-95% Accuracy on the validation set
More information: I am using Adam optimizer with 0.0001 lr, batch size of 16, using imagenet model weights, and categorical_crossentropy for my loss. I am using the same dataset on each version and I am using the same training script. I simply switch conda enviroments to TF 2.4 and 2.9.
Did something change between both versions that cause this discrepancy? Did the EfficientNet model weights change? Is the way the validation accuracy are calculated is different? Are the opimizers implementations are different?
I would appreciate your help and I would like some information on how to make it consistent between both versions. Thanks