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

Solve the problem of fetching prediction and make data dim configurable #772

Merged
merged 2 commits into from
Mar 27, 2018

Conversation

kuke
Copy link
Collaborator

@kuke kuke commented Mar 26, 2018

Fix #771

@kuke kuke changed the title Solve the problem of fetching prediction Solve the problem of fetching prediction and make data dim configurable Mar 26, 2018
@kuke kuke requested a review from pkuyym March 26, 2018 11:44
@@ -32,6 +32,11 @@ def parse_args():
default=1,
help='The minimum sequence number of a batch data. '
'(default: %(default)d)')
parser.add_argument(
Copy link
Contributor

Choose a reason for hiding this comment

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

@zhxfl Seems this value should be calculated by data reader.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a contradiction: After the data reader really begins to read data, it knows the actual dimensions of frame and label data. But before that, the network has been parsed and the right dimensions of feeding data are needed in advance. So the better way is to set this dimension manually.

@@ -47,6 +52,11 @@ def parse_args():
type=int,
default=1024,
help='Hidden size of lstmp unit. (default: %(default)d)')
parser.add_argument(
'--class_num',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Explained in last comment.

@@ -20,6 +21,7 @@ def stacked_lstmp_model(hidden_dim,
label data respectively. And in inference, only `feature` is needed.

Args:
frame_dim(int): The frame dimension of feature data.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please align the indent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@pkuyym pkuyym left a comment

Choose a reason for hiding this comment

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

LGTM

@kuke kuke merged commit 745591a into PaddlePaddle:develop Mar 27, 2018
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.

None yet

2 participants