microsoft / MMdnn

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
MIT License
5.8k stars 965 forks source link

Tensorflow has not supported operator [MaxPoolWithArgmax] with name [resnet_model/MaxPoolWithArgmax]. #887

Open arya-none opened 4 years ago

arya-none commented 4 years ago

Platform :arm centos

Python version:3.7.5

Source framework with version (like Tensorflow 1.4.1 with GPU):tensorflow 1.15

when tried ”mmconvert -sf tensorflow -iw resnet50_910to310.pb --dstNodeName resnet_model/final_dense -df caffe -om tf_resnet --inNodeName input_data --inputShape 224,224,3”,i get the erros as below:

2020-08-14 22:21:28.678883: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version WARNING:tensorflow:From /usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_frozenparser.py:175: The name tf.train.export_meta_graph is deprecated. Please use tf.compat.v1.train.export_meta_graph instead. Tensorflow has not supported operator [MaxPoolWithArgmax] with name [resnet_model/MaxPoolWithArgmax]. Traceback (most recent call last): File "/usr/local/python3.7.5/bin/mmconvert", line 8, in sys.exit(_main()) File "/usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main ret = convertToIR._convert(ir_args) File "/usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 120, in _convert parser.run(args.dstPath) File "/usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run self.gen_IR() File "/usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_frozenparser.py", line 397, in gen_IR self.rename_UNKNOWN(current_node) File "/usr/local/python3.7.5/lib/python3.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_frozenparser.py", line 459, in rename_UNKNOWN assert False AssertionError

any one help me to figure out what is the problem? thanks .

ziyuang commented 3 years ago

I am having something similar and I guess mmdnn doesn't recognize the operators created with Keras API rather than pure TensorFlow API.