backnotprop / fast-style-transfer-coreml

https://medium.com/@rambossa/diy-prisma-fast-style-transfer-app-with-coreml-and-tensorflow-817c3b90dacd
MIT License
113 stars 17 forks source link

tf_converter.convert Error #3

Open icaruslucifer opened 5 years ago

icaruslucifer commented 5 years ago

when I frozen pb file from 6.7M to 1.7M,then run tf_converter.conver, error info as : Traceback (most recent call last): File "/Users/icarus/Documents/icarusCode/Python/neural-style-transfer/fast-style-transfer-coreml-master/fast_style_transfer/convert_graph/convert.py", line 5, in image_input_names = ['img_placeholder__0']) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_tf_coreml_converter.py", line 586, in convert custom_conversion_functions=custom_conversion_functions) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_tf_coreml_converter.py", line 337, in _convert_pb_to_mlmodel convert_ops_to_layers(context) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_ops_to_layers.py", line 178, in convert_ops_to_layers translator(op, context) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_layers_common.py", line 77, in effectively_constant_op add_const(context, out.name, x, out.name) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_layers_common.py", line 26, in add_const _add_const(context, name, x, output_name, shape) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tfcoreml/_shape_sensitive_layers.py", line 44, in _add_const 'Add constant: cannot add a constant in which all the dimensions ' \ AssertionError: Add constant: cannot add a constant in which all the dimensions (Seq, C, H, W) are of non-unit size