Python3.6.9 TensorFlow2.3.0
Python3.6.7 TensorFlow2.1.0
Download the model created by Google Colab and When I tried to run it in the local environment, I got angry when TesorFlow was imported.
ʻImportError: DLL load failed: The specified module cannot be found
`
After investigating, it seems that Microsoft Visual C ++ Redistributable is required from TensorFlow 2.1. Install from the following URL. https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
This is the solution! However, I encounter an error again.
I tried to load the model with the following code ...
from tensorflow.keras.models import load_model
new_model = load_model(r'***.h5')
A message like ↓ is displayed and cannot be read.
KeyError: 'sample_weight_mode'
Once again, thanks to Google Sensei, There was a person with the exact same phenomenon in an overseas forum. https://github.com/keras-team/keras/issues/14040
According to this article, it seems that an error will occur when trying to load a model created with TensorFlow 2.3 with a lower version.
When I raised TensorFlow in my local environment to 2.3, it loaded successfully. (The command is below)
pip install tensorflow==2.3.0
Recommended Posts