Skip to content

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

Merged
kuke merged 2 commits intoPaddlePaddle:developfrom
kuke:fix_fetch
Mar 27, 2018
Merged

Solve the problem of fetching prediction and make data dim configurable#772
kuke merged 2 commits intoPaddlePaddle:developfrom
kuke:fix_fetch

Conversation

@kuke
Copy link
Collaborator

@kuke kuke commented Mar 26, 2018

Fix #771

@kuke kuke changed the title Solve the problem of fetching prediction Mar 26, 2018
@kuke kuke requested a review from pkuyym March 26, 2018 11:44
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.

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.

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

2 participants