-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feat] Support saving and loading models in different formats #3758
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
@@ -1 +1 @@ | |||
README_CN.md | |||
README_CN.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺带修复bug,与PR主题无关。
docs/install.md
Outdated
@@ -8,20 +8,20 @@ English | [简体中文](install_cn.md) | |||
- pip/pip3(9.0.1+),64-bit version | |||
- CUDA >= 10.2 | |||
- cuDNN >= 7.6 | |||
- PaddlePaddle (the version >= 2.4) | |||
- PaddlePaddle (the version >= 3.0.0b0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仿照PaddleNLP,接口变更后不再支持旧版本Paddle。
@@ -203,7 +203,7 @@ def forward_tokens(self, x): | |||
def forward(self, x): | |||
x = self.patch_embed(x) | |||
x = self.forward_tokens(x) | |||
if self.mode is not 'multi_scale': | |||
if self.mode != 'multi_scale': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺带修复bug,与PR主题无关。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for predictor config init
help="The deploy config generated by exporting model.", | ||
type=str, | ||
required=True) | ||
parser.add_argument("--config", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatter自动更新,与主题无关。
@@ -62,7 +61,10 @@ def collect_dynamic_shape(args): | |||
|
|||
# prepare config | |||
cfg = DeployConfig(args.config) | |||
pred_cfg = PredictConfig(cfg.model, cfg.params) | |||
if paddle.__version__.split('.')[0] == '2': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
兼容paddle 2.x
|
||
@property | ||
def transforms(self): | ||
return self._transforms | ||
|
||
@property | ||
def model(self): | ||
return os.path.join(self._dir, self.dic['Deploy']['model']) | ||
if self._is_old_format: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
兼容旧版本导出模型格式。
PR types
New features
PR changes
APIs
Description
适应Paddle 3.0不同格式的静态图模型。
TODO: