Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kaldi-commonvoice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Will
kaldi-commonvoice
Commits
45b98978
Commit
45b98978
authored
May 20, 2016
by
Daniel Povey
Browse files
Options
Downloads
Plain Diff
Merge pull request #793 from danpovey/nnet3-decoding-dim-check
Add dimension check in online-nnet3 decoding code, so we get more mea…
parents
4a76336a
8dca28c1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nnet3/online-nnet3-decodable-simple.cc
+14
-3
14 additions, 3 deletions
src/nnet3/online-nnet3-decodable-simple.cc
with
14 additions
and
3 deletions
src/nnet3/online-nnet3-decodable-simple.cc
+
14
−
3
View file @
45b98978
...
...
@@ -44,6 +44,20 @@ DecodableNnet3SimpleOnline::DecodableNnet3SimpleOnline(
ComputeSimpleNnetContext
(
am_nnet_
.
GetNnet
(),
&
left_context_
,
&
right_context_
);
log_priors_
.
ApplyLog
();
// Check that the dimensions are correct.
int32
input_dim
=
am_nnet_
.
GetNnet
().
InputDim
(
"input"
);
int32
ivector_dim
=
std
::
max
<
int32
>
(
0
,
am_nnet_
.
GetNnet
().
InputDim
(
"ivector"
));
// We use feature extraction code that was designed for nnet2, which just
// appends the mfcc and ivector features. So here we have to separate them
// again. This code just checks that the dimension is as we expect.
int32
feature_dim
=
features_
->
Dim
();
if
(
feature_dim
!=
input_dim
+
ivector_dim
)
{
KALDI_ERR
<<
"Dimension of features "
<<
feature_dim
<<
" does not equal "
<<
"input dim "
<<
input_dim
<<
" + ivector dim "
<<
ivector_dim
<<
" of neural network. Likely the config and neural net "
<<
"mismatch."
;
}
}
...
...
@@ -120,9 +134,6 @@ void DecodableNnet3SimpleOnline::ComputeForFrame(int32 subsampled_frame) {
int32
num_subsampled_frames
=
NumSubsampledFrames
(
input_frame_end
-
input_frame_begin
-
left_context_
-
right_context_
);
// I'm not checking if the input feature vector is ok.
// It should be done, but I'm not sure if it is the best place.
// Maybe a new "nnet3 feature pipeline"?
int32
mfcc_dim
=
am_nnet_
.
GetNnet
().
InputDim
(
"input"
);
int32
ivector_dim
=
am_nnet_
.
GetNnet
().
InputDim
(
"ivector"
);
// MFCCs in the left chunk
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment