Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert mobilenet-v1 from mace-models reports error #787

Open
hustc12 opened this issue Oct 31, 2023 · 0 comments
Open

Convert mobilenet-v1 from mace-models reports error #787

hustc12 opened this issue Oct 31, 2023 · 0 comments

Comments

@hustc12
Copy link

hustc12 commented Oct 31, 2023

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): Ubuntu 23.10
  • NDK version(e.g., 15c): 17.2.4988734
  • GCC version(if compiling for host, e.g., 5.4.0): 13.2.0
  • MACE version (Use the command: git describe --long --tags): v1.1.1-20-g42ee056f
  • Python version(2.7): 3.11.5
  • Bazel version (e.g., 0.13.0): 0.13.0

Model deploy file (*.yml)

  1 library_name: mobilenet-v1
  2 target_abis: [armeabi-v7a, arm64-v8a]
  3 model_graph_format: file
  4 model_data_format: file
  5 models:
  6   mobilenet_v1:
  7     platform: tensorflow
  8     model_file_path: https://cnbj1.fds.api.xiaomi.com/mace/miai-models/mobilenet-v1/mobilenet-v1-1.0.pb
  9     model_sha256_checksum: 71b10f540ece33c49a7b51f5d4095fc9bd78ce46ebf0300487b2ee23d71294e6
 10     subgraphs:
 11       - input_tensors:
 12           - input
 13         input_shapes:
 14           - 1,224,224,3
 15         output_tensors:
 16           - MobilenetV1/Predictions/Reshape_1
 17         output_shapes:
 18           - 1,1001
 19         validation_inputs_data:
 20           - https://cnbj1.fds.api.xiaomi.com/mace/inputs/dog.npy
 21     runtime: cpu+gpu
 22     limit_opencl_kernel_time: 0
 23     nnlib_graph_mode: 0
 24     obfuscate: 0
 25     winograd: 0

Describe the problem

After set up and build mace, when trying to convert the mobilenet-v1 from mace-models will get an error. The error message has been listed following

Traceback (most recent call last):
File "/home/username/2-working/mace/tools/python/convert.py", line 281, in
conf = config_parser.parse(flags.config)
File "/home/username/2-working/mace/tools/python/utils/config_parser.py", line 64, in parse
config = sanitize_load(f.read())
File "/home/username/2-working/mace/tools/python/utils/config_parser.py", line 59, in sanitize_load
return yaml.load(s)
TypeError: load() missing 1 required positional argument: 'Loader'

To Reproduce

Steps to reproduce the problem:

1. cd /path/to/mace
2. python tools/python/convert.py --config ../mace-models/mobilenet-v1/mobilenet-v1.yml

Error information / logs

Please include the full log and/or traceback here.

LOGs

Additional context

I didn't modify any source code. I checkout mace source code and mace-models from github, and build mace code according to instructions, trying to convert the mobilenet model following the instructions from the doc step by step. However, errors popped up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant