Commit d368ee31 authored by Dan Povey's avatar Dan Povey
Browse files

trunk: fix bug in nnet-component.cc introduced in revision 4581 (2 days ago),...

trunk: fix bug in nnet-component.cc introduced in revision 4581 (2 days ago), which strongly affected speed of nnet2 training.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4590 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 757064ad
......@@ -2620,8 +2620,7 @@ void SpliceComponent::Propagate(const ChunkInfo &in_info,
0, dim),
out_part(*out, 0, out->NumRows(),
c * dim, dim);
for (int i=0; i<indexes[c].size(); i++)
out_part.CopyRows(in_part, indexes[c]);
out_part.CopyRows(in_part, indexes[c]);
}
if (const_dim != 0) {
CuSubMatrix<BaseFloat> in_part(in, 0, in.NumRows(),
......@@ -2690,7 +2689,8 @@ void SpliceComponent::Backprop(const ChunkInfo &in_info,
for (int32 c = 0; c < num_splice; c++) {
for (int32 offset = 0; offset < output_chunk_size; offset++) {
indexes[c][chunk * input_chunk_size + offset] =
indexes[c][(chunk-1) * input_chunk_size + offset] + output_chunk_size;
indexes[c][(chunk-1) * input_chunk_size + offset] +
output_chunk_size;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment