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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Will
kaldi-commonvoice
Commits
b789820c
Commit
b789820c
authored
8 years ago
by
vesis84
Browse files
Options
Downloads
Patches
Plain Diff
nnet1: minor cosmetic change,
parent
7cf8616c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
egs/wsj/s5/utils/nnet/make_blstm_proto.py
+2
-2
2 additions, 2 deletions
egs/wsj/s5/utils/nnet/make_blstm_proto.py
src/nnet/nnet-parallel-component.h
+4
-6
4 additions, 6 deletions
src/nnet/nnet-parallel-component.h
with
6 additions
and
8 deletions
egs/wsj/s5/utils/nnet/make_blstm_proto.py
+
2
−
2
View file @
b789820c
...
...
@@ -28,8 +28,8 @@ parser = OptionParser(usage)
# Required,
parser
.
add_option
(
'
--cell-dim
'
,
dest
=
'
cell_dim
'
,
type
=
'
int
'
,
default
=
320
,
help
=
'
Number of cells for one direction in BLSTM [default: %default]
'
);
parser
.
add_option
(
'
--proj-dim
'
,
dest
=
'
proj_dim
'
,
type
=
'
int
'
,
default
=
4
00
,
help
=
'
Number of LSTM recurrent units
[default: %default]
'
);
parser
.
add_option
(
'
--proj-dim
'
,
dest
=
'
proj_dim
'
,
type
=
'
int
'
,
default
=
2
00
,
help
=
'
Dim reduction for one direction in BLSTM
[default: %default]
'
);
parser
.
add_option
(
'
--num-layers
'
,
dest
=
'
num_layers
'
,
type
=
'
int
'
,
default
=
2
,
help
=
'
Number of BLSTM layers [default: %default]
'
);
# Optional (default == 'None'),
...
...
This diff is collapsed.
Click to expand it.
src/nnet/nnet-parallel-component.h
+
4
−
6
View file @
b789820c
...
...
@@ -75,10 +75,8 @@ class ParallelComponent : public MultistreamComponent {
<<
" (NestedNnet|NestedNnetFilename|NestedNnetProto)"
;
}
}
// initialize,
KALDI_ASSERT
((
nested_nnet_proto
.
size
()
>
0
)
^
(
nested_nnet_filename
.
size
()
>
0
));
// ^xor,
// read nnets from files,
// Initialize,
// First, read nnets from files,
if
(
nested_nnet_filename
.
size
()
>
0
)
{
for
(
int32
i
=
0
;
i
<
nested_nnet_filename
.
size
();
i
++
)
{
Nnet
nnet
;
...
...
@@ -88,7 +86,7 @@ class ParallelComponent : public MultistreamComponent {
<<
nested_nnet_filename
[
i
];
}
}
// initialize nnets from prototypes,
//
Second,
initialize nnets from prototypes,
if
(
nested_nnet_proto
.
size
()
>
0
)
{
for
(
int32
i
=
0
;
i
<
nested_nnet_proto
.
size
();
i
++
)
{
Nnet
nnet
;
...
...
@@ -98,7 +96,7 @@ class ParallelComponent : public MultistreamComponent {
<<
nested_nnet_proto
[
i
];
}
}
//
c
heck dim-sum of nested nnets,
//
C
heck dim-sum of nested nnets,
int32
nnet_input_sum
=
0
,
nnet_output_sum
=
0
;
for
(
int32
i
=
0
;
i
<
nnet_
.
size
();
i
++
)
{
nnet_input_sum
+=
nnet_
[
i
].
InputDim
();
...
...
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
register
or
sign in
to comment