when I try to load a model in Azure ML with below code I get an error. anyone know how to fix the issue with Azure?
from tensorflow import keras
keras.models.load_model('model.h5')
AttributeError Traceback (most recent call last)
Input In [24], in <cell line: 2>()
1 from tensorflow import keras
----> 2 keras.models.load_model('model_base-3.h5')
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/tensorflow/python/keras/saving/save.py:184, in load_model(filepath, custom_objects, compile)
181 with generic_utils.CustomObjectScope(custom_objects or {}):
182 if (h5py is not None and (
183 isinstance(filepath, h5py.File) or h5py.is_hdf5(filepath))):
--> 184 return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile)
186 if sys.version_info >= (3, 4) and isinstance(filepath, pathlib.Path):
187 filepath = str(filepath)
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py:176, in load_model_from_hdf5(filepath, custom_objects, compile)
174 if model_config is None:
175 raise ValueError('No model found in config file.')
--> 176 model_config = json.loads(model_config.decode('utf-8'))
177 model = model_config_lib.model_from_config(model_config,
178 custom_objects=custom_objects)
180 # set weights
AttributeError: 'str' object has no attribute 'decode'