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

[WIP]support export after save model #9134

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

zhangyubo0722
Copy link
Collaborator

No description provided.

Copy link

paddle-bot bot commented Sep 9, 2024

Thanks for your contribution!

@@ -75,7 +75,7 @@ def __init__(self, cfg, mode='train'):
self.custom_white_list = self.cfg.get('custom_white_list', None)
self.custom_black_list = self.cfg.get('custom_black_list', None)
self.use_master_grad = self.cfg.get('master_grad', False)
if 'slim' in cfg and cfg['slim_type'] == 'PTQ':
if ('slim' in cfg and cfg['slim_type'] == 'PTQ') or 'model_export_enabled' in cfg:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更改变量名,统一模型输出

@@ -1212,8 +1212,13 @@ def _get_infer_cfg_and_input_spec(self,
"img_name": str,
})
if prune_input:
if self.cfg.get("model_export_enabled", False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.xxx. 不做判断

super().__init__()
self.base_model = model

def eval(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否必要

save_name,
epoch_id + 1,
ema_model=weight)
if self.model_export_enabled:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ema 静态图, else

@@ -366,7 +366,8 @@ def _dump_infer_config(config, path, image_shape, model):
else:
reader_cfg = config['TestReader']
dataset_cfg = config['TestDataset']

# print(dataset_cfg)
# exit()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删掉

@CLAassistant
Copy link

CLAassistant commented Sep 19, 2024

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

2 participants