Merged
Conversation
… add_merge_model_scripts
Xreki
reviewed
Oct 27, 2017
python/paddle/utils/merge_model.py
Outdated
| from paddle.proto import ModelConfig_pb2 | ||
| from paddle.v2.topology import Topology | ||
|
|
||
| def merge_model(net_out, param_file, output_file): |
Contributor
There was a problem hiding this comment.
How about name it merge_v2_model? I think it can only be used for v2 model.
python/paddle/utils/merge_model.py
Outdated
| ends with .py. The parameters file stores the parameters of the model | ||
| which ends with .tar.gz. | ||
|
|
||
| @param net_out the output layer of the network |
Contributor
There was a problem hiding this comment.
net will be ok, _out is puzzling.
python/paddle/utils/merge_model.py
Outdated
| which ends with .tar.gz. | ||
|
|
||
| @param net_out the output layer of the network | ||
| @param param_file path of the model parameters file(a gzip file). |
Contributor
There was a problem hiding this comment.
Path of model parameters (.tar.gz) which is stored by v2 api
python/paddle/utils/merge_model.py
Outdated
|
|
||
| net_out = mobile_net(3*224*224, 102) | ||
| param_file = YOUR_MODEL_PARAM_PATH | ||
| output_file = OUTPUT_MERGED_FILE_PATH |
Contributor
There was a problem hiding this comment.
param_file = param_pass_00000.tar.gz
output_file = out.paddle
… add_merge_model_scripts
Xreki
approved these changes
Oct 27, 2017
… add_merge_model_scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate the model config and model parameters into one file.
The model configuration file describes the model structure which ends with .py. The parameters file stores the parameters of the model which ends with .tar.gz.
@param net The output layer of the network
@param param_file Path of the model parameters(.tar.gz) which is stored by v2 api.
@param output_file Path of the merged file which will be generated
Usage: