Defines the trainer object that will perform the various training steps.
More...
|
| def | __init__ |
| | Constructor. More...
|
| |
| def | mvg_init |
| | Create a new mvg file based on collected data (not yet used. More...
|
| |
| def | tied |
| | Create + train models with tied gaussians (reduced semi-continuous) More...
|
| |
| def | phtied |
| | Create + train models with gaussians tied within the monophones only (reduced semi-continuous) More...
|
| |
| def | untied_new |
| | Create + train models with untied gaussians. More...
|
| |
| def | untied |
| | Create + train models with untied gaussians. More...
|
| |
| def | fvg |
| | Add a single full covariance matrix to the tied gaussian models. More...
|
| |
| def | cdtree |
| | Create context dependent models by means of a descision tree. More...
|
| |
| def | vitalign |
| | Create a new segmentation based on the model created in the previous training step. More...
|
| |
| def | install |
| | Copy the most current model files to the specified location. More...
|
| |
Defines the trainer object that will perform the various training steps.
| def spr_pylib.train.master.MasterTrainer.__init__ |
( |
|
self, |
|
|
|
config |
|
) |
| |
Constructor.
- Parameters
-
| self | The callee object. |
| config | The MasterConfig object holding all configuration data. |
| def spr_pylib.train.master.MasterTrainer.mvg_init |
( |
|
self, |
|
|
|
mvg_file, |
|
|
|
Ngauss, |
|
|
|
trk_file, |
|
|
|
siz_file |
|
) |
| |
Create a new mvg file based on collected data (not yet used.
probably wrong location)
- Parameters
-
| self | The callee object. |
| mvg_file | The destiantion file |
| Ngauss | Number of Gaussians per mixture (int) or file name containing state dependent values |
| trk_file | The collected data |
| siz_file | The data partitioning |
| def spr_pylib.train.master.MasterTrainer.tied |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
tng = "auto", |
|
|
|
mfpg = "auto", |
|
|
|
cfpg = "auto", |
|
|
|
ngps = "auto", |
|
|
|
mxszi = "auto", |
|
|
|
mxszs = "auto", |
|
|
|
ocs = "auto", |
|
|
|
ocv = "auto", |
|
|
|
_type = "tied" |
|
) |
| |
Create + train models with tied gaussians (reduced semi-continuous)
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations (excluding the initial segpass). |
| tng | Initial gaussians : total number of gaussians (maximum). |
| mfpg | Initial gaussians : create one gaussian per mfpg points. |
| cfpg | Initial gaussians : collect at max cfpg points per gaussians to estimate. |
| ngps | Initial gaussians : create at max ngps gaussians for a state. |
| mxszi | Initial HMM : make gaussians mixtures with mxszi gaussians per state. |
| mxszs | Before vitpass1 : limit the number of gaussians per state to mxszs . |
| ocs | Before vitpass1 : occupancy based culling of the gaussians weights. |
| ocv | Before vitpass2,3,... : occupancy based culling of the gaussians weights. |
| _type | Internal use only. Do not use. |
| def spr_pylib.train.master.MasterTrainer.phtied |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
tng = "auto", |
|
|
|
mfpg = "auto", |
|
|
|
cfpg = "auto", |
|
|
|
ngps = "auto", |
|
|
|
mxszi = "auto", |
|
|
|
mxszs = "auto", |
|
|
|
ocs = "auto", |
|
|
|
ocv = "auto" |
|
) |
| |
Create + train models with gaussians tied within the monophones only (reduced semi-continuous)
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations (excluding the initial segpass). |
| tng | Initial gaussians : total number of gaussians (maximum). |
| mfpg | Initial gaussians : create one gaussian per mfpg points. |
| cfpg | Initial gaussians : collect at max cfpg points per gaussians to estimate. |
| ngps | Initial gaussians : create at max ngps gaussians for a state. |
| mxszi | Initial HMM : make gaussians mixtures with mxszi gaussians per state. |
| mxszs | Before vitpass1 : limit the number of gaussians per state to mxszs . |
| ocs | Before vitpass1 : occupancy based culling of the gaussians weights. |
| ocv | Before vitpass2,3,... : occupancy based culling of the gaussians weights. |
| def spr_pylib.train.master.MasterTrainer.untied_new |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
tng = "auto", |
|
|
|
mfpg = "auto", |
|
|
|
cfpg = "auto", |
|
|
|
ngps = "auto", |
|
|
|
mxszi = "auto", |
|
|
|
mxszs = "auto", |
|
|
|
ocs = "auto", |
|
|
|
ocv = "auto" |
|
) |
| |
Create + train models with untied gaussians.
(Limited number of gaussians)
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations (excluding the initial segpass). |
| tng | Initial gaussians : total number of gaussians (maximum). |
| mfpg | Initial gaussians : create one gaussian per mfpg points. |
| cfpg | Initial gaussians : collect at max cfpg points per gaussians to estimate. |
| ngps | Initial gaussians : create at max ngps gaussians for a state. |
| mxszi | Initial HMM : make gaussians mixtures with mxszi gaussians per state. |
| mxszs | Before vitpass1 : limit the number of gaussians per state to mxszs . |
| ocs | Before vitpass1 : occupancy based culling of the gaussians weights. |
| ocv | Before vitpass2,3,... : occupancy based culling of the gaussians weights. |
| def spr_pylib.train.master.MasterTrainer.untied |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
tng = "auto", |
|
|
|
mfpg = "auto", |
|
|
|
cfpg = "auto", |
|
|
|
ngps = "auto" |
|
) |
| |
Create + train models with untied gaussians.
(Fixed number of gaussians)
If ngps and mfpg conflict, a balancing act is done.
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations. |
| tng | Total number of gaussians (maximum). |
| mfpg | Limit in the number of frames needed to make a gaussian. |
| cfpg | Collect at max cfpg points per gaussians to estimate. |
| ngps | Make gaussians mixtures with ngps gaussians per state. |
| def spr_pylib.train.master.MasterTrainer.fvg |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
ocv = "auto" |
|
) |
| |
Add a single full covariance matrix to the tied gaussian models.
The iterations specified with the niter argument will alternate between two different functionalities.
- odd iteration : estimate the full covariance matrix and update the gaussian set
- even iteration : re-estimate the mixture weights and gaussian set (vitpass)
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations. |
| ocv | Occupancy based culling of the gaussians weights before a vitpass. |
| def spr_pylib.train.master.MasterTrainer.cdtree |
( |
|
self, |
|
|
|
niter = 3, |
|
|
|
ocs = "auto", |
|
|
|
ocv = "auto", |
|
|
|
oci = "pct.4", |
|
|
|
dtmc = 512, |
|
|
|
dtlt = 512 |
|
) |
| |
Create context dependent models by means of a descision tree.
- Parameters
-
| self | The callee object. |
| niter | The number of training iterations (excluding the initial segpass with untied states). |
| ocs | Before vitpass1 : prune gaussians weights if occupancy is less than <p4>. |
| ocv | Before vitpass* : prune gaussians weights if occupancy is less than <p5>. |
| oci | Untied model : occupancy based culling of the gaussians weights |
| dtmc | Descision tree : minimum count. |
| dtlt | Descision tree : likelihood threshold |
| def spr_pylib.train.master.MasterTrainer.vitalign |
( |
|
self | ) |
|
Create a new segmentation based on the model created in the previous training step.
This can not be called as first step in a training setup.
- Parameters
-
| def spr_pylib.train.master.MasterTrainer.install |
( |
|
self, |
|
|
|
destdir = "result", |
|
|
|
name = "acmod" |
|
) |
| |
Copy the most current model files to the specified location.
- Parameters
-
| self | The callee object |
| destdir | The optional result directory, relative to the base dir |
| name | The optional name without extension for the various files |