MMdnn icon indicating copy to clipboard operation
MMdnn copied to clipboard

tensorflow_frozenparser.py:441 assert False in rename_UNKNOWN

Open thefiddler opened this issue 5 years ago • 4 comments

Platform: archlinux

Python version: 3.7.2

Source framework with version: Tensorflow 1.13 with GPU

Destination framework with version: onnx

Pre-trained model path (webpath or webdisk path): test.pb.zip

Running scripts: mmconvert -sf tensorflow -iw test.pb --inNodeName "in" --inputShape "512,512,1" --dstNodeName "out" -df onnx -om test.onnx 2>1 error.txt

WARNING:tensorflow:From /usr/lib/python3.7/site-packages/tensorflow/python/tools/strip_unused_lib.py:86: 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
Traceback (most recent call last):
  File "/home/ursula/.local/bin/mmconvert", line 10, in <module>
    sys.exit(_main())
  File "/home/ursula/.local/lib/python3.7/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main
    ret = convertToIR._convert(ir_args)
  File "/home/ursula/.local/lib/python3.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 115, in _convert
    parser.run(args.dstPath)
  File "/home/ursula/.local/lib/python3.7/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run
    self.gen_IR()
  File "/home/ursula/.local/lib/python3.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_frozenparser.py", line 379, in gen_IR
    self.rename_UNKNOWN(current_node)
  File "/home/ursula/.local/lib/python3.7/site-packages/mmdnn/conversion/tensorflow/tensorflow_frozenparser.py", line 441, in rename_UNKNOWN
    assert False
AssertionError

thefiddler avatar Apr 07 '19 18:04 thefiddler

Hi @thefiddler, there are a few unimplemented ops, including [Ceil], [Round] and [ResizeBicubic], which caused this error. But it seems that the model you provided is more like a preprocessing part of a complete model. If so, I need to explain that MMdnn does not support preprocessing of the conversion model. Thanks.

rainLiuplus avatar Apr 17 '19 06:04 rainLiuplus

@rainLiuplus thank you for your reply. This is indeed part of a complete model that was failing to be converted.

I simply isolated the failing part so that the issue can be reproduced more easily.

thefiddler avatar Apr 19 '19 06:04 thefiddler

Emm, so MMdnn does not support it. Maybe you can write code manually to implement preprocessing.

rainLiuplus avatar May 07 '19 07:05 rainLiuplus

Dear @rainLiuplus would you help to figure out,whats the problem? since i found "MaxPoolWithArgmax" exist in tensorflow documentation. when use mmdnn convert, it shew me "Tensorflow has not supported operator [MaxPoolWithArgmax] with name [resnet_model/MaxPoolWithArgmax]."

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

arya-none avatar Aug 14 '20 01:08 arya-none