nnet-compute-discriminative-parallel.h
Go to the documentation of this file.
1 // nnet2/nnet-compute-discriminative-parallel.h
2 
3 // Copyright 2012-2013 Johns Hopkins University (author: Daniel Povey)
4 
5 // See ../../COPYING for clarification regarding multiple authors
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 // MERCHANTABLITY OR NON-INFRINGEMENT.
17 // See the Apache 2 License for the specific language governing permissions and
18 // limitations under the License.
19 
20 #ifndef KALDI_NNET2_NNET_COMPUTE_DISCRIMINATIVE_PARALLEL_H_
21 #define KALDI_NNET2_NNET_COMPUTE_DISCRIMINATIVE_PARALLEL_H_
22 
23 #include "nnet2/am-nnet.h"
24 #include "nnet2/nnet-example.h"
25 #include "hmm/transition-model.h"
27 
28 namespace kaldi {
29 namespace nnet2 {
30 
31 /* This header provides a multi-threaded version of the discriminative training
32  code (this is for a CPU-based, instead of GPU-based, setup).
33  Note: we expect that "nnet_to_update" will be the same as "&(am_nnet.GetNnet())"
34 */
35 
37  const AmNnet &am_nnet,
38  const TransitionModel &tmodel,
39  const NnetDiscriminativeUpdateOptions &opts,
40  int32 num_threads,
42  Nnet *nnet_to_update,
43  NnetDiscriminativeStats *stats);
44 
45 
46 } // namespace nnet2
47 } // namespace kaldi
48 
49 #endif // KALDI_NNET2_NNET_COMPUTE_DISCRIMINATIVE_PARALLEL_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
SequentialTableReader< KaldiObjectHolder< DiscriminativeNnetExample > > SequentialDiscriminativeNnetExampleReader
Definition: nnet-example.h:183
void NnetDiscriminativeUpdateParallel(const AmNnet &am_nnet, const TransitionModel &tmodel, const NnetDiscriminativeUpdateOptions &opts, int32 num_threads, SequentialDiscriminativeNnetExampleReader *example_reader, Nnet *nnet_to_update, NnetDiscriminativeStats *stats)