Open jhelsas opened 3 years ago
I am also facing an issue with the conversion of the EfficientNet model.
It gives an error:
tf executing eager_mode: True
tf.keras model eager_mode: False
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-f36257e9acf1> in <module>
1 output_model_path = "./saveModel/Model16_EffB7_No_meta.onnx"
----> 2 onnx_model = keras2onnx.convert_keras(model, model.name)
3 keras2onnx.save_model(onnx_model, output_model_path)
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/main.py in convert_keras(model, name, doc_string, target_opset, channel_first_inputs, debug_mode, custom_op_conversions)
78 parse_graph_modeless(topology, tf_graph, target_opset, input_names, output_names, output_dict)
79 else:
---> 80 parse_graph(topology, tf_graph, target_opset, output_names, output_dict)
81 topology.compile()
82
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/parser.py in parse_graph(topo, graph, target_opset, output_names, keras_node_dict)
837 topo.raw_model.add_output_name(str_value)
838
--> 839 return _parse_graph_core_v2(
840 graph, keras_node_dict, topo, top_level, output_names
841 ) if is_tf2 and is_tf_keras else _parse_graph_core(
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/parser.py in _parse_graph_core_v2(graph, keras_node_dict, topology, top_scope, output_names)
725 _on_parsing_time_distributed_layer(graph, layer_info.nodelist, layer_info.layer, model_, varset)
726 elif layer_info.layer and get_converter(type(layer_info.layer)):
--> 727 on_parsing_keras_layer_v2(graph, layer_info, varset)
728 else:
729 _on_parsing_tf_nodes(graph, layer_info.nodelist, varset, topology.debug_mode)
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/_parser_tf.py in on_parsing_keras_layer_v2(graph, layer_info, varset, prefix)
330 iname = prefix + i_.name
331 k2o_logger().debug('\tinput : ' + iname)
--> 332 var_type = adjust_input_batch_size(infer_variable_type(i_, varset.target_opset))
333 i0 = varset.get_local_variable_or_declare_one(iname, var_type)
334 operator.add_input(i0)
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/_parser_tf.py in infer_variable_type(tensor, opset, inbound_node_shape)
45 return BooleanTensorType(shape=tensor_shape)
46 else:
---> 47 raise ValueError(
48 "Unable to find out a correct type for tensor type = {} of {}".format(tensor_type, tensor.name))
49
ValueError: Unable to find out a correct type for tensor type = 20 of top_bn/ReadVariableOp/resource:0
And when I tried the example script it gives me the following error:
tf executing eager_mode: True
tf.keras model eager_mode: False
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-13-f65dad0d3c63> in <module>
1 import keras2onnx
2 output_model_path = "keras_efficientNet.onnx"
----> 3 onnx_model = keras2onnx.convert_keras(model, model.name)
4 keras2onnx.save_model(onnx_model, output_model_path)
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/main.py in convert_keras(model, name, doc_string, target_opset, channel_first_inputs, debug_mode, custom_op_conversions)
81 topology.compile()
82
---> 83 return convert_topology(topology, name, doc_string, target_opset, channel_first_inputs)
84
85
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/topology.py in convert_topology(topology, model_name, doc_string, target_opset, channel_first_inputs)
325 graph = None
326 extra_inputs = _build_extra_inputs(container)
--> 327 nodes = _remove_unused_nodes(container.nodes, container.inputs + extra_inputs, container.outputs)
328
329 if not topology.debug_mode:
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/keras2onnx/topology.py in _remove_unused_nodes(nodes, inputs, outputs)
229 node_inputs.append(output_dict[in_])
230 else:
--> 231 assert in_ == '' or in_ in input_dict, \
232 "{} is disconnected, check the parsing log for more details.".format(in_)
233
AssertionError: input_1:01 is disconnected, check the parsing log for more details.
Sorry to ask, but, have any mantainers seen this issue?
Hi @jhelsas, I have tried a slightly different approach to convert Keras model to Onnx. To give an overview, I have done transfer learning on the Keras EfficientNet model.
First, I convert my Keras model to Tensorflow Model using:
from tensorflow import keras
model = keras.models.load_model('./saveModel/model.hdf5')
model.save('./saveModel/optimised/', save_format="tf")
Then I use tf2onnx to convert my Tensorflow model to .onnx
format using:
python -m tf2onnx.convert \
--saved-model ./saveModel/optimised \
--output ./saveModel/model.onnx \
--opset 13
When converting the EfficientModel is gives several gradient warning (reference here) Importing a function function-name with ops with custom gradients. Will likely fail if a gradient is requested.
. But the model successfully gets converted into the onnx format.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,223 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,223 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,223 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,224 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,224 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,225 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,225 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,226 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,226 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,226 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,226 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,227 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,228 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,228 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,228 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,229 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,229 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,229 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,230 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,230 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,231 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,231 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,232 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,232 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,233 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,233 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,233 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,234 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,234 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,234 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,235 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,235 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,236 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,236 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,236 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,237 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,237 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,238 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,238 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,238 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,239 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,239 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,240 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,240 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,240 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,241 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,241 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,241 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,242 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,242 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,243 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,243 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,244 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,244 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,245 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,245 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,245 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,246 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,246 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,246 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,247 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,247 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,248 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,248 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,248 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,249 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,249 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,250 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,250 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,251 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,251 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,251 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,252 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,252 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,253 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,253 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,253 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,254 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,254 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,255 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,255 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,256 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,256 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,256 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,257 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,257 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,257 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:09,258 - WARNING - Importing a function (__inference_efficientnetb7_layer_call_and_return_conditional_losses_129988) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2g_expand_activation_layer_call_and_return_conditional_losses_144769) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,523 - WARNING - Importing a function (__inference_block2g_expand_activation_layer_call_and_return_conditional_losses_144769) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3b_se_reduce_layer_call_and_return_conditional_losses_146007) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,561 - WARNING - Importing a function (__inference_block3b_se_reduce_layer_call_and_return_conditional_losses_146007) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2e_expand_activation_layer_call_and_return_conditional_losses_143663) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,584 - WARNING - Importing a function (__inference_block2e_expand_activation_layer_call_and_return_conditional_losses_143663) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5g_se_reduce_layer_call_and_return_conditional_losses_158079) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,591 - WARNING - Importing a function (__inference_block5g_se_reduce_layer_call_and_return_conditional_losses_158079) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5f_expand_activation_layer_call_and_return_conditional_losses_157347) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,659 - WARNING - Importing a function (__inference_block5f_expand_activation_layer_call_and_return_conditional_losses_157347) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6i_activation_layer_call_and_return_conditional_losses_164628) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,740 - WARNING - Importing a function (__inference_block6i_activation_layer_call_and_return_conditional_losses_164628) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2f_se_reduce_layer_call_and_return_conditional_losses_56481) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,766 - WARNING - Importing a function (__inference_block2f_se_reduce_layer_call_and_return_conditional_losses_56481) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4d_expand_activation_layer_call_and_return_conditional_losses_150758) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,780 - WARNING - Importing a function (__inference_block4d_expand_activation_layer_call_and_return_conditional_losses_150758) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4a_se_reduce_layer_call_and_return_conditional_losses_60390) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,798 - WARNING - Importing a function (__inference_block4a_se_reduce_layer_call_and_return_conditional_losses_60390) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3a_activation_layer_call_and_return_conditional_losses_57315) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,838 - WARNING - Importing a function (__inference_block3a_activation_layer_call_and_return_conditional_losses_57315) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5a_se_reduce_layer_call_and_return_conditional_losses_64737) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,899 - WARNING - Importing a function (__inference_block5a_se_reduce_layer_call_and_return_conditional_losses_64737) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2f_activation_layer_call_and_return_conditional_losses_144355) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:10,906 - WARNING - Importing a function (__inference_block2f_activation_layer_call_and_return_conditional_losses_144355) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5a_expand_activation_layer_call_and_return_conditional_losses_154629) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,030 - WARNING - Importing a function (__inference_block5a_expand_activation_layer_call_and_return_conditional_losses_154629) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2g_activation_layer_call_and_return_conditional_losses_144908) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,032 - WARNING - Importing a function (__inference_block2g_activation_layer_call_and_return_conditional_losses_144908) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2c_activation_layer_call_and_return_conditional_losses_142696) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,076 - WARNING - Importing a function (__inference_block2c_activation_layer_call_and_return_conditional_losses_142696) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5d_expand_activation_layer_call_and_return_conditional_losses_65865) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,112 - WARNING - Importing a function (__inference_block5d_expand_activation_layer_call_and_return_conditional_losses_65865) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6g_se_reduce_layer_call_and_return_conditional_losses_71672) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,138 - WARNING - Importing a function (__inference_block6g_se_reduce_layer_call_and_return_conditional_losses_71672) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6m_expand_activation_layer_call_and_return_conditional_losses_74173) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,206 - WARNING - Importing a function (__inference_block6m_expand_activation_layer_call_and_return_conditional_losses_74173) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5b_expand_activation_layer_call_and_return_conditional_losses_155135) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,214 - WARNING - Importing a function (__inference_block5b_expand_activation_layer_call_and_return_conditional_losses_155135) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5d_activation_layer_call_and_return_conditional_losses_156380) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,239 - WARNING - Importing a function (__inference_block5d_activation_layer_call_and_return_conditional_losses_156380) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4g_expand_activation_layer_call_and_return_conditional_losses_152417) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,264 - WARNING - Importing a function (__inference_block4g_expand_activation_layer_call_and_return_conditional_losses_152417) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6h_se_reduce_layer_call_and_return_conditional_losses_72112) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,268 - WARNING - Importing a function (__inference_block6h_se_reduce_layer_call_and_return_conditional_losses_72112) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2d_se_reduce_layer_call_and_return_conditional_losses_55601) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,278 - WARNING - Importing a function (__inference_block2d_se_reduce_layer_call_and_return_conditional_losses_55601) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4h_expand_activation_layer_call_and_return_conditional_losses_152970) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,309 - WARNING - Importing a function (__inference_block4h_expand_activation_layer_call_and_return_conditional_losses_152970) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5i_expand_activation_layer_call_and_return_conditional_losses_159006) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,316 - WARNING - Importing a function (__inference_block5i_expand_activation_layer_call_and_return_conditional_losses_159006) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6a_activation_layer_call_and_return_conditional_losses_160251) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,348 - WARNING - Importing a function (__inference_block6a_activation_layer_call_and_return_conditional_losses_160251) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4b_se_reduce_layer_call_and_return_conditional_losses_60777) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,380 - WARNING - Importing a function (__inference_block4b_se_reduce_layer_call_and_return_conditional_losses_60777) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4i_se_reduce_layer_call_and_return_conditional_losses_153702) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,393 - WARNING - Importing a function (__inference_block4i_se_reduce_layer_call_and_return_conditional_losses_153702) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2g_activation_layer_call_and_return_conditional_losses_56874) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,482 - WARNING - Importing a function (__inference_block2g_activation_layer_call_and_return_conditional_losses_56874) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3g_activation_layer_call_and_return_conditional_losses_59902) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,547 - WARNING - Importing a function (__inference_block3g_activation_layer_call_and_return_conditional_losses_59902) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5j_activation_layer_call_and_return_conditional_losses_159698) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,557 - WARNING - Importing a function (__inference_block5j_activation_layer_call_and_return_conditional_losses_159698) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3d_expand_activation_layer_call_and_return_conditional_losses_146934) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,656 - WARNING - Importing a function (__inference_block3d_expand_activation_layer_call_and_return_conditional_losses_146934) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block1c_se_reduce_layer_call_and_return_conditional_losses_53561) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,697 - WARNING - Importing a function (__inference_block1c_se_reduce_layer_call_and_return_conditional_losses_53561) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6g_se_reduce_layer_call_and_return_conditional_losses_163562) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,703 - WARNING - Importing a function (__inference_block6g_se_reduce_layer_call_and_return_conditional_losses_163562) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5h_se_reduce_layer_call_and_return_conditional_losses_158632) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,717 - WARNING - Importing a function (__inference_block5h_se_reduce_layer_call_and_return_conditional_losses_158632) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6h_expand_activation_layer_call_and_return_conditional_losses_163936) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,758 - WARNING - Importing a function (__inference_block6h_expand_activation_layer_call_and_return_conditional_losses_163936) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block1d_se_reduce_layer_call_and_return_conditional_losses_141124) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,809 - WARNING - Importing a function (__inference_block1d_se_reduce_layer_call_and_return_conditional_losses_141124) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6j_expand_activation_layer_call_and_return_conditional_losses_72853) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,903 - WARNING - Importing a function (__inference_block6j_expand_activation_layer_call_and_return_conditional_losses_72853) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4j_expand_activation_layer_call_and_return_conditional_losses_154076) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,920 - WARNING - Importing a function (__inference_block4j_expand_activation_layer_call_and_return_conditional_losses_154076) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5h_expand_activation_layer_call_and_return_conditional_losses_158453) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,944 - WARNING - Importing a function (__inference_block5h_expand_activation_layer_call_and_return_conditional_losses_158453) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6a_se_reduce_layer_call_and_return_conditional_losses_69085) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,958 - WARNING - Importing a function (__inference_block6a_se_reduce_layer_call_and_return_conditional_losses_69085) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block7d_expand_activation_layer_call_and_return_conditional_losses_168866) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,964 - WARNING - Importing a function (__inference_block7d_expand_activation_layer_call_and_return_conditional_losses_168866) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6c_activation_layer_call_and_return_conditional_losses_161310) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,972 - WARNING - Importing a function (__inference_block6c_activation_layer_call_and_return_conditional_losses_161310) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block7a_expand_activation_layer_call_and_return_conditional_losses_74613) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,975 - WARNING - Importing a function (__inference_block7a_expand_activation_layer_call_and_return_conditional_losses_74613) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4b_expand_activation_layer_call_and_return_conditional_losses_60638) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,980 - WARNING - Importing a function (__inference_block4b_expand_activation_layer_call_and_return_conditional_losses_60638) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4e_activation_layer_call_and_return_conditional_losses_151450) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,991 - WARNING - Importing a function (__inference_block4e_activation_layer_call_and_return_conditional_losses_151450) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3b_expand_activation_layer_call_and_return_conditional_losses_57610) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:11,993 - WARNING - Importing a function (__inference_block3b_expand_activation_layer_call_and_return_conditional_losses_57610) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5h_expand_activation_layer_call_and_return_conditional_losses_67625) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,054 - WARNING - Importing a function (__inference_block5h_expand_activation_layer_call_and_return_conditional_losses_67625) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block4d_se_reduce_layer_call_and_return_conditional_losses_150937) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,075 - WARNING - Importing a function (__inference_block4d_se_reduce_layer_call_and_return_conditional_losses_150937) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block5j_activation_layer_call_and_return_conditional_losses_68597) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,114 - WARNING - Importing a function (__inference_block5j_activation_layer_call_and_return_conditional_losses_68597) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2d_activation_layer_call_and_return_conditional_losses_143249) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,119 - WARNING - Importing a function (__inference_block2d_activation_layer_call_and_return_conditional_losses_143249) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block2e_expand_activation_layer_call_and_return_conditional_losses_55902) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,136 - WARNING - Importing a function (__inference_block2e_expand_activation_layer_call_and_return_conditional_losses_55902) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6g_activation_layer_call_and_return_conditional_losses_163522) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,237 - WARNING - Importing a function (__inference_block6g_activation_layer_call_and_return_conditional_losses_163522) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6f_activation_layer_call_and_return_conditional_losses_71185) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,274 - WARNING - Importing a function (__inference_block6f_activation_layer_call_and_return_conditional_losses_71185) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6e_activation_layer_call_and_return_conditional_losses_70745) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:12,295 - WARNING - Importing a function (__inference_block6e_activation_layer_call_and_return_conditional_losses_70745) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block3d_activation_layer_call_and_return_conditional_losses_147073) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:14,505 - WARNING - Importing a function (__inference_block3d_activation_layer_call_and_return_conditional_losses_147073) with ops with custom gradients. Will likely fail if a gradient is requested.
WARNING:tensorflow:Importing a function (__inference_block6m_se_reduce_layer_call_and_return_conditional_losses_166880) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:17:17,083 - WARNING - Importing a function (__inference_block6m_se_reduce_layer_call_and_return_conditional_losses_166880) with ops with custom gradients. Will likely fail if a gradient is requested.
2021-05-21 23:24:33,675 - INFO - Signatures found in model: [serving_default].
2021-05-21 23:24:33,676 - WARNING - '--signature_def' not specified, using first signature: serving_default
2021-05-21 23:24:33,677 - INFO - Output names: ['output_layer']
2021-05-21 23:24:33.759229: I tensorflow/core/grappler/devices.cc:69] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 1
2021-05-21 23:24:33.759413: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2021-05-21 23:24:33.760503: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0001:00:00.0 name: NVIDIA Tesla K80 computeCapability: 3.7
coreClock: 0.8235GHz coreCount: 13 deviceMemorySize: 11.17GiB deviceMemoryBandwidth: 223.96GiB/s
2021-05-21 23:24:33.760554: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2021-05-21 23:24:33.760596: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
2021-05-21 23:24:33.760623: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10
2021-05-21 23:24:33.760649: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10
2021-05-21 23:24:33.760684: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10
2021-05-21 23:24:33.760721: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10
2021-05-21 23:24:33.760758: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2021-05-21 23:24:33.762181: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2021-05-21 23:24:33.762236: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-05-21 23:24:33.762261: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2021-05-21 23:24:33.762281: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2021-05-21 23:24:33.763722: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10626 MB memory) -> physical GPU (device: 0, name: NVIDIA Tesla K80, pci bus id: 0001:00:00.0, compute capability: 3.7)
2021-05-21 23:24:33.982306: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:816] Optimization results for grappler item: graph_to_optimize
2021-05-21 23:24:33.982391: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] function_optimizer: Graph size after: 5341 nodes (4295), 5714 edges (4668), time = 128.069ms.
2021-05-21 23:24:33.982400: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] function_optimizer: function_optimizer did nothing. time = 2.858ms.
2021-05-21 23:24:54.524694: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0001:00:00.0 name: NVIDIA Tesla K80 computeCapability: 3.7
coreClock: 0.8235GHz coreCount: 13 deviceMemorySize: 11.17GiB deviceMemoryBandwidth: 223.96GiB/s
2021-05-21 23:24:54.524793: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2021-05-21 23:24:54.524843: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
2021-05-21 23:24:54.524867: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10
2021-05-21 23:24:54.524890: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10
2021-05-21 23:24:54.524913: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10
2021-05-21 23:24:54.524936: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10
2021-05-21 23:24:54.524960: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2021-05-21 23:24:54.526407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2021-05-21 23:24:54.526455: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-05-21 23:24:54.526469: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2021-05-21 23:24:54.526479: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2021-05-21 23:24:54.527915: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10626 MB memory) -> physical GPU (device: 0, name: NVIDIA Tesla K80, pci bus id: 0001:00:00.0, compute capability: 3.7)
WARNING:tensorflow:From /anaconda/envs/azureml_py38/lib/python3.8/site-packages/tf2onnx/tf_loader.py:621: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2021-05-21 23:24:58,098 - WARNING - From /anaconda/envs/azureml_py38/lib/python3.8/site-packages/tf2onnx/tf_loader.py:621: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
2021-05-21 23:24:58.276560: I tensorflow/core/grappler/devices.cc:69] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 1
2021-05-21 23:24:58.276787: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2021-05-21 23:24:58.278036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0001:00:00.0 name: NVIDIA Tesla K80 computeCapability: 3.7
coreClock: 0.8235GHz coreCount: 13 deviceMemorySize: 11.17GiB deviceMemoryBandwidth: 223.96GiB/s
2021-05-21 23:24:58.278088: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2021-05-21 23:24:58.278132: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
2021-05-21 23:24:58.278154: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcufft.so.10
2021-05-21 23:24:58.278175: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcurand.so.10
2021-05-21 23:24:58.278196: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusolver.so.10
2021-05-21 23:24:58.278254: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcusparse.so.10
2021-05-21 23:24:58.278272: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2021-05-21 23:24:58.279654: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2021-05-21 23:24:58.279729: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-05-21 23:24:58.279744: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2021-05-21 23:24:58.279755: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2021-05-21 23:24:58.281188: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10626 MB memory) -> physical GPU (device: 0, name: NVIDIA Tesla K80, pci bus id: 0001:00:00.0, compute capability: 3.7)
2021-05-21 23:25:12.761873: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:816] Optimization results for grappler item: graph_to_optimize
2021-05-21 23:25:12.761928: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] constant_folding: Graph size after: 2975 nodes (-2093), 3458 edges (-2093), time = 10111.0283ms.
2021-05-21 23:25:12.761935: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] function_optimizer: function_optimizer did nothing. time = 7.178ms.
2021-05-21 23:25:12.761940: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] constant_folding: Graph size after: 2975 nodes (0), 3458 edges (0), time = 2458.67505ms.
2021-05-21 23:25:12.761945: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818] function_optimizer: function_optimizer did nothing. time = 7.563ms.
2021-05-21 23:25:18,163 - INFO - Using tensorflow=2.3.0, onnx=1.9.0, tf2onnx=1.9.0/936cec
2021-05-21 23:25:18,163 - INFO - Using opset <onnx, 13>
2021-05-21 23:25:43,869 - INFO - Computed 0 values for constant folding
2021-05-21 23:27:02,967 - INFO - Optimizing ONNX model
2021-05-21 23:27:33,000 - INFO - After optimization: BatchNormalization -156 (163->7), Cast -115 (115->0), Concat -52 (55->3), Const -1343 (1933->590), GlobalAveragePool +55 (0->55), Identity -53 (53->0), ReduceMean -55 (55->0), Reshape -59 (115->56), Shape -55 (55->0), Slice -55 (55->0), Split +3 (0->3), Transpose -929 (931->2), Unsqueeze -220 (220->0)
2021-05-21 23:27:39,233 - INFO -
2021-05-21 23:27:39,234 - INFO - Successfully converted TensorFlow model ./saveModel/optimised to ONNX
2021-05-21 23:27:39,234 - INFO - Model inputs: ['efficientnetb7_input:0']
2021-05-21 23:27:39,234 - INFO - Model outputs: ['output_layer']
2021-05-21 23:27:39,234 - INFO - ONNX model is saved at ./saveModel/model.onnx
And when I tried to load the Onnx model for inference, it is predicting as expected using:
import numpy as np
import onnxruntime as ort
sess_ort = ort.InferenceSession("./saveModel/model.onnx")
input_name = sess_ort.get_inputs()[0].name
label_name = sess_ort.get_outputs()[0].name
img = cv2.imread('./predictImage/image.jpg')
X_test = img .reshape(1, 380, 380, 3)
sess_ort.run(output_names = [label_name], input_feed = {input_name: X_test .astype(np.float32)})[0]
Hope that helped
Dear keras2onnx mantainers,
I am trying to convert a keras model to onnx format using your library, but I am having trouble. I first tried with my model, then I tried just running the example notebook and it failed. the error on my model is the following:
Which is essentially the same as the one I found running the example notebook in here :
I have tried with tensorflow 2.4.0 and 2.1.0, the later recommended in the notebook. I don't really know how to proceed from here, if you have any suggestion it would be greatly appreciated.
Best regards,
José hugo Elsas