mixup-nnet.h
Go to the documentation of this file.
1 // nnet2/mixup-nnet.h
2 
3 // Copyright 2012 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_MIXUP_NNET_H_
21 #define KALDI_NNET2_MIXUP_NNET_H_
22 
23 #include "nnet2/nnet-update.h"
24 #include "nnet2/nnet-compute.h"
25 #include "itf/options-itf.h"
26 
27 namespace kaldi {
28 namespace nnet2 {
29 
35 
36 
37  NnetMixupConfig(): power(0.25), min_count(1000.0),
38  num_mixtures(-1), perturb_stddev(0.01) { }
39 
40  void Register(OptionsItf *opts) {
41  opts->Register("power", &power, "Scaling factor used in determining the "
42  "number of mixture components to use for each HMM state "
43  "(or group of HMM states)");
44  opts->Register("min-count", &min_count, "Minimum count for a quasi-Gaussian, "
45  "enforced while allocating mixtures (obscure parameter).");
46  opts->Register("num-mixtures", &num_mixtures, "If specified, total number of "
47  "mixture components to mix up to (should be at least the "
48  "#leaves in the system");
49  opts->Register("perturb-stddev", &perturb_stddev, "Standard deviation used "
50  "when perturbing parameters during mixing up");
51  }
52 };
53 
61 void MixupNnet(const NnetMixupConfig &mixup_config,
62  Nnet *nnet);
63 
64 
65 
66 } // namespace nnet2
67 } // namespace kaldi
68 
69 #endif
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
kaldi::int32 int32
virtual void Register(const std::string &name, bool *ptr, const std::string &doc)=0
void Register(OptionsItf *opts)
Definition: mixup-nnet.h:40
This header provides functionality for sample-by-sample stochastic gradient descent and gradient comp...
void MixupNnet(const NnetMixupConfig &mixup_config, Nnet *nnet)
This function works as follows.
Definition: mixup-nnet.cc:86