热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

ProbleminconvertingssdinceptionmodelfrommxnettoIR.

Platform(likeubuntu16.04):Pythonversion:2.7.12Sourceframeworkwithv

Platform (like ubuntu 16.04):

Python version: 2.7.12

Source framework with version: MXNET 1.0.0 with GPU

Destination framework with version: Tensorflow 1.4.1 with GPU

I was able to convert InceptionV3 (mxnet) to IR but I encounter a problem when I try to convert ssd InceptionV3 model(mxnet).

Running scripts:

1
root:/home/bomo/Desktop# python -m mmdnn.conversion._script.convertToIR -f mxnet -n ssd_inceptionv3_512-symbol.json -d ssd_inceptionv3_512 --inputShape 3 512 512

error:

1
2
3
4
5
6
7
8
9
10
11
12
13
[14:37:20] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.12.0. Attempting to upgrade...

[14:37:20] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!

/mxnet/python/mxnet/module/base_module.py:53: UserWarning: You created Module with Module(..., label_names=['softmax_label']) but input with name 'softmax_label' is not found in symbol.list_arguments(). Did you mean one of:

    data

    label

  warnings.warn(msg)

Warning: MXNet Parser has not supported operator null with name data.

Warning: convert the null operator with name [data] into input layer.

Warning: MXNet Parser has not supported operator null with name label.

Warning: convert the null operator with name [label] into input layer.

[14:37:20] /mxnet/dmlc-core/include/dmlc/./logging.h:308: **[14:37:20] src/c_api/c_api_symbolic.cc:417: InferShapeKeyword argument name data not found.

Candidate arguments:

    [0]label**

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
infer_shape error. Arguments:

  data: (1, 3, 512, 512)

Traceback (most recent call last):

  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

    "__main__", fname, loader, pkg_name)

  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

    exec code in run_globals

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/_script/convertToIR.py", line 159, in

    _main()

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/_script/convertToIR.py", line 154, in _main

    ret = _convert(args)

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/_script/convertToIR.py", line 95, in _convert

    parser.gen_IR()

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 269, in gen_IR

    self.rename_UNKNOWN(current_node)

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 388, in rename_UNKNOWN

    self.set_output_shape(source_node, IR_node)

  File "/usr/local/lib/python2.7/dist-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 285, in set_output_shape

    arg_shape, output_shape, aux_shape = sym.infer_shape(data = self.data_shape)

  File "/mxnet/python/mxnet/symbol/symbol.py", line 965, in infer_shape

    res = self._infer_shape_impl(False, *args, **kwargs)

  File "/mxnet/python/mxnet/symbol/symbol.py", line 1095, in _infer_shape_impl

    ctypes.byref(complete)))

  File "/mxnet/python/mxnet/base.py", line 146, in check_call

    raise MXNetError(py_str(_LIB.MXGetLastError()))

**mxnet.base.MXNetError: [14:37:20] src/c_api/c_api_symbolic.cc:417: InferShapeKeyword argument name data not found.

Candidate arguments:

    [0]label**

该提问来源于开源项目:microsoft/MMdnn

Hello, were you able to solve this issue?



I have trained a custom yolo3 darknet-53 (using gluon-cv mxnet)
I need to convert the model to tensorflow for final inference.

I am facing the same issue while converting yolo3_darknet-53 mxnet model to IR.




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ai-mxnet/lib/python3.6/site-packages/mxnet/module/base_module.py:55: UserWarning: You created Module with Module(..., label_names=['softmax_label']) but input with name 'softmax_label' is not found in symbol.list_arguments(). Did you mean one of:

        data

        _defaultpreprocess0_init_mean

        _defaultpreprocess0_init_scale

        yolov30_yolooutputv30_offset_0

        yolov30_yolooutputv30_anchor_0

        yolov30_yolooutputv31_offset_1

        yolov30_yolooutputv31_anchor_1

        yolov30_yolooutputv32_offset_2

        yolov30_yolooutputv32_anchor_2

  warnings.warn(msg)

Warning: MXNet Parser has not supported operator null with name data.

Warning: convert the null operator with name [data] into input layer.

Warning: MXNet Parser has not supported operator null with name _defaultpreprocess0_init_scale.

Warning: convert the null operator with name [_defaultpreprocess0_init_scale] into input layer.

infer_shape error. Arguments:

  data: (1, 3, 608, 608)

...

call

    raise MXNetError(py_str(_LIB.MXGetLastError()))

mxnet.base.MXNetError: [17:49:07] src/c_api/c_api_symbolic.cc:540: InferShapeKeyword argument name data not found.

Candidate arguments:

        [0]_defaultpreprocess0_init_scale

Thanks!


   



推荐阅读
author-avatar
红烧大青虫
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有