-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Conversation
@@ -32,6 +32,11 @@ def parse_args(): | |||
default=1, | |||
help='The minimum sequence number of a batch data. ' | |||
'(default: %(default)d)') | |||
parser.add_argument( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained in last comment.
fluid/DeepASR/model_utils/model.py
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please align the indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #771