Teachable machine’s H5 models not loading in tensorflow 2.16.1
File G:\Python\Anaconda\Lib\site-packages\keras\src\ops\operation.py:208 in from_config
return cls(**config)
File G:\Python\Anaconda\Lib\site-packages\keras\src\layers\convolutional\depthwise_conv2d.py:118 in init
super().init(
File G:\Python\Anaconda\Lib\site-packages\keras\src\layers\convolutional\base_depthwise_conv.py:106 in init
super().init(
File G:\Python\Anaconda\Lib\site-packages\keras\src\layers\layer.py:264 in init
raise ValueError(
ValueError: Unrecognized keyword arguments passed to DepthwiseConv2D: {‘groups’: 1}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File G:\Python\Anaconda\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File g:_leap robots\dps\atl marathon\nutrition app\identification2.py:9
model = load_model(model_path)
File G:\Python\Anaconda\Lib\site-packages\keras\src\saving\saving_api.py:183 in load_model
return legacy_h5_format.load_model_from_hdf5(filepath)
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\legacy_h5_format.py:133 in load_model_from_hdf5
model = saving_utils.model_from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\saving_utils.py:85 in model_from_config
return serialization.deserialize_keras_object(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\serialization.py:495 in deserialize_keras_object
deserialized_obj = cls.from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\models\sequential.py:326 in from_config
layer = saving_utils.model_from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\saving_utils.py:85 in model_from_config
return serialization.deserialize_keras_object(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\serialization.py:495 in deserialize_keras_object
deserialized_obj = cls.from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\models\sequential.py:326 in from_config
layer = saving_utils.model_from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\saving_utils.py:85 in model_from_config
return serialization.deserialize_keras_object(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\serialization.py:495 in deserialize_keras_object
deserialized_obj = cls.from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\models\model.py:528 in from_config
return functional_from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\models\functional.py:509 in functional_from_config
process_layer(layer_data)
File G:\Python\Anaconda\Lib\site-packages\keras\src\models\functional.py:489 in process_layer
layer = saving_utils.model_from_config(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\saving_utils.py:85 in model_from_config
return serialization.deserialize_keras_object(
File G:\Python\Anaconda\Lib\site-packages\keras\src\legacy\saving\serialization.py:504 in deserialize_keras_object
deserialized_obj = cls.from_config(cls_config)
File G:\Python\Anaconda\Lib\site-packages\keras\src\ops\operation.py:210 in from_config
raise TypeError(
TypeError: Error when deserializing class ‘DepthwiseConv2D’ using config={‘name’: ‘expanded_conv_depthwise’, ‘trainable’: True, ‘dtype’: ‘float32’, ‘kernel_size’: [3, 3], ‘strides’: [1, 1], ‘padding’: ‘same’, ‘data_format’: ‘channels_last’, ‘dilation_rate’: [1, 1], ‘groups’: 1, ‘activation’: ‘linear’, ‘use_bias’: False, ‘bias_initializer’: {‘class_name’: ‘Zeros’, ‘config’: {}}, ‘bias_regularizer’: None, ‘activity_regularizer’: None, ‘bias_constraint’: None, ‘depth_multiplier’: 1, ‘depthwise_initializer’: {‘class_name’: ‘VarianceScaling’, ‘config’: {‘scale’: 1, ‘mode’: ‘fan_avg’, ‘distribution’: ‘uniform’, ‘seed’: None}}, ‘depthwise_regularizer’: None, ‘depthwise_constraint’: None}.
Exception encountered: Unrecognized keyword arguments passed to DepthwiseConv2D: {‘groups’: 1}