!3094 net_parameter_init

Merge pull request !3094 from mindspore_ding/new_ding_parameter_mind
This commit is contained in:
mindspore-ci-bot 2020-07-15 18:04:05 +08:00 committed by Gitee
commit ee4d90b2cd
1 changed files with 1 additions and 0 deletions

View File

@ -424,6 +424,7 @@ def export(net, *inputs, file_name, file_format='GEIR'):
if is_training:
net.set_train(mode=False)
# export model
net.init_parameters_data()
if file_format == 'GEIR':
_executor.compile(net, *inputs, phase='export')
_executor.export(net, file_name, file_format)