提交 e2fb8b2e 编写于 作者: J jiangjiajun

fix bug of export inference

上级 cf529fc1
...@@ -116,20 +116,7 @@ def fix_input_shape(info, fixed_input_shape=None): ...@@ -116,20 +116,7 @@ def fix_input_shape(info, fixed_input_shape=None):
resize = {'ResizeByShort': {}} resize = {'ResizeByShort': {}}
padding = {'Padding': {}} padding = {'Padding': {}}
if info['_Attributes']['model_type'] == 'classifier': if info['_Attributes']['model_type'] == 'classifier':
crop_size = 0 pass
for transform in info['Transforms']:
if 'CenterCrop' in transform:
crop_size = transform['CenterCrop']['crop_size']
break
assert crop_size == fixed_input_shape[
0], "fixed_input_shape must == CenterCrop:crop_size:{}".format(
crop_size)
assert crop_size == fixed_input_shape[
1], "fixed_input_shape must == CenterCrop:crop_size:{}".format(
crop_size)
if crop_size == 0:
logging.warning(
"fixed_input_shape must == input shape when trainning")
else: else:
resize['ResizeByShort']['short_size'] = min(fixed_input_shape) resize['ResizeByShort']['short_size'] = min(fixed_input_shape)
resize['ResizeByShort']['max_size'] = max(fixed_input_shape) resize['ResizeByShort']['max_size'] = max(fixed_input_shape)
......
...@@ -19,7 +19,7 @@ long_description = "PaddleX. A end-to-end deeplearning model development toolkit ...@@ -19,7 +19,7 @@ long_description = "PaddleX. A end-to-end deeplearning model development toolkit
setuptools.setup( setuptools.setup(
name="paddlex", name="paddlex",
version='1.0.6', version='1.0.6a4',
author="paddlex", author="paddlex",
author_email="paddlex@baidu.com", author_email="paddlex@baidu.com",
description=long_description, description=long_description,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册