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

AttributeError: 'NoneType' object has no attribute 'name' #891

Open lsplsplsp1111 opened 4 years ago

lsplsplsp1111 commented 4 years ago

tensorflow convert caffe:

from ._conv import register_converters as _register_converters Parse file [model.ckpt-61236.meta] with binary format successfully. Tensorflow model file [model.ckpt-61236.meta] loaded successfully. Tensorflow checkpoint file [model.ckpt-61236] loaded successfully. [435] variables loaded. WARNING:tensorflow:From /home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py:269: 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 TensorflowEmitter has not supported operator [IteratorV2] with name [IteratorV2]. TensorflowEmitter has not supported operator [IteratorGetNext] with name [IteratorGetNext]. Traceback (most recent call last): File "/home/lsp/.local/bin/mmconvert", line 8, in sys.exit(_main()) File "/home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main ret = convertToIR._convert(ir_args) File "/home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py", line 120, in _convert parser.run(args.dstPath) File "/home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run self.gen_IR() File "/home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 421, in gen_IR func(current_node) File "/home/lsp/.local/lib/python3.6/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 815, in rename_FusedBatchNorm self.set_weight(source_node.name, 'mean', self.ckpt_data[mean.name]) AttributeError: 'NoneType' object has no attribute 'name'

so,what can i do?

lsplsplsp1111 commented 4 years ago

my command is mmconvert -sf tensorflow -in model.ckpt-61236.meta -iw model.ckpt-61236 --dstNodeName pred_hmap pred_paf -df caffe -om pose