mace icon indicating copy to clipboard operation
mace copied to clipboard

not support convtranspose with output_padding yet

Open wtmilk opened this issue 5 years ago • 1 comments

Before you open an issue, please make sure you have tried the following steps:

  1. Make sure your environment is the same with (https://mace.readthedocs.io/en/latest/installation/env_requirement.html).
  2. Have you ever read the document for your usage?
  3. Check if your issue appears in HOW-TO-DEBUG or FAQ.
  4. The form below must be filled.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • NDK version(e.g., 15c):
  • GCC version(if compiling for host, e.g., 5.4.0):
  • MACE version (Use the command: git describe --long --tags):
  • Python version(2.7):
  • Bazel version (e.g., 0.13.0):

Model deploy file (*.yml)

library_name: mobile-net target_abis: [arm64-v8a] model_graph_format: file model_data_format: file models: mobilenet: platform: onnx model_file_path: /home/github/model_opt.onnx model_sha256_checksum: f5c8a9d0a737c0338f306517e8abd6d0f46656f2cf18dd7cd3b4ba19aeb89658 subgraphs: - input_tensors: data output_tensors: deconv input_shapes: 1,128,320,3 output_shapes: 1,1000 runtime: cpu limit_opencl_kernel_time: 0 nnlib_graph_mode: 0 obfuscate: 0

Describe the problem

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the problem:

1. cd /path/to/mace
2. python tools/converter.py convert --config_file=/path/to/your/model_deployment_file

Error information / logs

File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/converter.py", line 404, in main(unused_args=[sys.argv[0]] + unparsed) File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/converter.py", line 224, in main output_graph_def = converter.run() File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/converter_tool/onnx_converter.py", line 451, in run self.convert_ops(graph_def) File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/converter_tool/onnx_converter.py", line 527, in convert_ops self._op_convertersnode.op_type File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/converter_tool/onnx_converter.py", line 742, in convert_deconv "not support convtranspose with output_padding yet.") File "/home/wuteng/github/mace/bazel-bin/mace/python/tools/converter.runfiles/mace/mace/python/tools/convert_util.py", line 20, in mace_check raise Exception(msg) Exception: not support convtranspose with output_padding yet. Traceback (most recent call last): File "tools/converter.py", line 1317, in flags.func(flags) File "tools/converter.py", line 824, in convert_func convert_model(configs, flags.cl_mem_type) File "tools/converter.py", line 753, in convert_model ",".join(model_config.get(YAMLKeyword.graph_optimize_options, []))) File "/home/wuteng/github/mace/tools/sh_commands.py", line 549, in gen_model_code _fg=True) File "/home/wuteng/.local/lib/python2.7/site-packages/sh.py", line 1413, in call raise exc sh.ErrorReturnCode_1:


### Additional context
i have saw the todo list
        # TODO: if output shape specified, calculate padding value
        # if 'output_padding' in node.attrs:
        #     output_padding = node.attrs['output_padding']
        #     output_padding_arg = op.arg.add()
        #     output_padding_arg.name = MaceKeyword.mace_output_padding_str
        #     output_padding_arg.ints.extend(output_padding)
        # if 'output_shape' in node.attrs:
        #     output_shape = node.attrs['output_shape']
        #     output_shape_arg = op.arg.add()
        #     output_shape_arg.name = MaceKeyword.mace_output_shape_str
        #     output_shape_arg.ints.extend(output_shape)
does converter lags behind the code?  Or Transpose convolution with out padding is not supported in Mace?

wtmilk avatar May 14 '19 08:05 wtmilk

Could you provide any testing onnx model for this problem? we'll look into it.

TonyMou avatar May 17 '19 08:05 TonyMou