Browse Source

!8372 mode_export_example

From: @bai-yangfan
Reviewed-by: @sanjaychan,@kingxian
Signed-off-by: @sanjaychan
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
b6ff3537be
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      model_zoo/official/cv/lenet_quant/export.py
  2. +1
    -1
      model_zoo/official/cv/mobilenetv2_quant/export.py
  3. +1
    -1
      tests/st/quantization/lenet_quant/test_lenet_quant.py

+ 1
- 1
model_zoo/official/cv/lenet_quant/export.py View File

@@ -56,4 +56,4 @@ if __name__ == "__main__":

# export network
inputs = Tensor(np.ones([1, 1, cfg.image_height, cfg.image_width]), mindspore.float32)
export(network, inputs, file_name="lenet_quant", file_format='MINDIR', quant_mode='AUTO')
export(network, inputs, file_name="lenet_quant.mindir", file_format='MINDIR', quant_mode='AUTO')

+ 1
- 1
model_zoo/official/cv/mobilenetv2_quant/export.py View File

@@ -53,5 +53,5 @@ if __name__ == '__main__':
# export network
print("============== Starting export ==============")
inputs = Tensor(np.ones([1, 3, cfg.image_height, cfg.image_width]), mindspore.float32)
export(network, inputs, file_name="mobilenet_quant", file_format='MINDIR', quant_mode='AUTO')
export(network, inputs, file_name="mobilenet_quant.mindir", file_format='MINDIR', quant_mode='AUTO')
print("============== End export ==============")

+ 1
- 1
tests/st/quantization/lenet_quant/test_lenet_quant.py View File

@@ -147,7 +147,7 @@ def export_lenet():

# export network
inputs = Tensor(np.ones([1, 1, cfg.image_height, cfg.image_width]), mstype.float32)
export(network, inputs, file_name="lenet_quant", file_format='MINDIR', quant_mode='AUTO')
export(network, inputs, file_name="lenet_quant.mindir", file_format='MINDIR', quant_mode='AUTO')


@pytest.mark.level0


Loading…
Cancel
Save