[oneDNN]Fix to close the file before exiting load_weights()
Hi @mraunak It looks like your PR relates to the Keras component. Please submit it to the github.com/keras-team/keras repository instead. Thankyou.
@fchollet, @qlzh727 Hi @gbaned, this file ( tensorflow/python/keras/engine/training.py) is getting called when the user is executing his code in the issue mentioned which resides inside the TensorFlow. I am not sure how fixing in Keras repo would fix this issue. Hi @gbaned, yeah sure I will submit PR to the github.com/keras-team/keras repository.
The method 'load_weights()' which loads all layer weights, either from a TensorFlow or an HDF5 weight file, kept the file open due to which the next action of saving the checkpoints was failing on windows server 2019. The code change will now make sure that the weight files are closed before exiting the 'load_weights()' method.
The solution fixes https://github.com/tensorflow/tensorflow/issues/58740