Traceback (most recent call last):


 "<stdin>", line 1, in <module>


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/metrics_utils.py", line 76, in decorated

update_op = update_state_fn(*args, **kwargs)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 568, in __call__

result = self._call(*args, **kwds)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 615, in _call

self._initialize(args, kwds, add_initializers_to=initializers)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 497, in _initialize

*args, **kwds))


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2389, in _get_concrete_function_internal_garbage_collected

graph_function, _, _ = self._maybe_define_function(args, kwargs)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2703, in _maybe_define_function

graph_function = self._create_graph_function(args, kwargs)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2593, in _create_graph_function

capture_by_value=self._capture_by_value),


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 978, in func_graph_from_py_func

func_outputs = python_func(*func_args, **func_kwargs)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 439, in wrapped_fn

return weak_wrapped_fn().__wrapped__(*args, **kwds)


 "/home/user/.local/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 968, in wrapper

raise e.ag_error_metadata.to_exception(e)
ValueError: in converted code:

Traceback (most recent call last):


 "test_coreml.py", line 83, in <module>

custom_conversion_functions={ "MaxPoolingWithArgmax2D": ConvertMaxPoolingWithArgmax2D } )


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 804, in convert

use_float_arraytype=use_float_arraytype)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 585, in convertToSpec

use_float_arraytype=use_float_arraytype)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/coremltools/converters/keras/_keras2_converter.py", line 319, in _convert

model = _keras.models.load_model(model, custom_objects = custom_objects)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/engine/saving.py", line 419, in load_model

model = _deserialize_model(f, custom_objects, compile)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/engine/saving.py", line 225, in _deserialize_model

model = model_from_config(model_config, custom_objects=custom_objects)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/engine/saving.py", line 458, in model_from_config

return deserialize(config, custom_objects=custom_objects)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/layers/__init__.py", line 55, in deserialize

printable_module_name='layer')


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object

list(custom_objects.items())))


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/engine/network.py", line 1022, in from_config

process_layer(layer_data)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/engine/network.py", line 1008, in process_layer

custom_objects=custom_objects)


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/layers/__init__.py", line 55, in deserialize

printable_module_name='layer')


 "/Users/carlos/anaconda3/envs/ml/lib/python3.7/site-packages/keras/utils/generic_utils.py", line 138, in deserialize_keras_object

': ' + class_name)
ValueError: Unknown layer: MaxPoolingWithArgmax2D
