Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Yoann HOUPERT
kaldi_2015
Commits
372a1505
Commit
372a1505
authored
Aug 16, 2015
by
Xingyu Na
Browse files
accel ReverseIndexes
parent
fd619d7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/nnet2/nnet-component.cc
src/nnet2/nnet-component.cc
+6
-1
No files found.
src/nnet2/nnet-component.cc
View file @
372a1505
...
...
@@ -3930,8 +3930,13 @@ void Convolutional1dComponent::Add(BaseFloat alpha, const UpdatableComponent &ot
void
Convolutional1dComponent
::
ReverseIndexes
(
const
std
::
vector
<
int32
>
&
forward_indexes
,
int32
input_dim
,
std
::
vector
<
std
::
vector
<
int32
>
>
*
backward_indexes
)
{
int32
i
;
int32
i
,
size
=
forward_indexes
.
size
();
int32
reserve_size
=
2
+
size
/
input_dim
;
backward_indexes
->
resize
(
input_dim
);
std
::
vector
<
std
::
vector
<
int32
>
>::
iterator
iter
=
backward_indexes
->
begin
(),
end
=
backward_indexes
->
end
();
for
(;
iter
!=
end
;
++
iter
)
iter
->
reserve
(
reserve_size
);
for
(
int32
j
=
0
;
j
<
forward_indexes
.
size
();
j
++
)
{
i
=
forward_indexes
[
j
];
KALDI_ASSERT
(
i
<
input_dim
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment