PaddlePaddle / Anakin

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
https://anakin.baidu.com/
Apache License 2.0
532 stars 135 forks source link

转换TensorFlow模型时不支持String类型Node #543

Closed liuliuniu closed 4 years ago

liuliuniu commented 4 years ago

使用convert.py转换TensorFlow(1.12版本)模型时报错如下: tensor.type=7 Traceback (most recent call last): File "converter.py", line 113, in graph = Graph(config) File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/graph.py", line 46, in init self.graph_io = self.parser() File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/tensorflow/parser_tf.py", line 27, in call med_graph = self._conver_tf_2_med() File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/tensorflow/parser_tf.py", line 41, in _conver_tf_2_med return parser.parse() File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/tensorflow/parse_tf_2_med.py", line 201, in parse nodes = self._parse_tf_node(tf_graph, {}) File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/tensorflow/parse_tf_2_med.py", line 73, in _parse_tf_node anakin_tensor = tf_to_anakin_tensor(node.get_attr(a)) File "/data0/xikali/tangram_run/anakin/tools/external_converter_v2/parser/tensorflow/tf_trans_util.py", line 94, in tf_to_anakin_tensor new_type = TF_TO_ANAKIN_DTYPE[tensor.dtype] KeyError: 7 看上去应该是无法支持tensor.dtype是string类型的?已经删除了所有string类型的特征,但是tf中Assert的op一定是包含string类型的tensor,这个如何解决呢?

Shixiaowei02 commented 4 years ago

您好,Anakin 转换器仅对有限的 TensorFlow 模型进行了支持。本仓储已停止维护,请使用 X2Paddle 尝试,谢谢!