2015-05-07 02:43:28 +03:00
|
|
|
== Dev branch ==
|
|
|
|
This branch contains some features that are not yet checked into main branch. To enlist this branch, run
|
|
|
|
|
|
|
|
git checkout origin/Dev
|
|
|
|
|
|
|
|
== To-do ==
|
|
|
|
Add descriptions to LSTMnode
|
|
|
|
Add descriptions to 0/1 mask segmentation in feature reader, delay node, and crossentropywithsoftmax node
|
|
|
|
Change criterion node to use the 0/1 mask, following example in crossentropywithsoftmax node
|
|
|
|
Add description of encoder-decoder simple network builder
|
|
|
|
Add description of time-reverse node, simple network builder and NDL builder for bi-directional models
|
|
|
|
|
2015-01-20 09:41:29 +03:00
|
|
|
== Author of the README ==
|
2015-05-07 02:43:28 +03:00
|
|
|
Kaisheng Yao
|
|
|
|
Microsoft Research
|
|
|
|
email: kaisheny@microsoft.com
|
|
|
|
|
2015-01-20 09:41:29 +03:00
|
|
|
Wengong Jin,
|
|
|
|
Shanghai Jiao Tong University
|
|
|
|
email: acmgokun@gmail.com
|
|
|
|
|
2015-04-05 23:14:59 +03:00
|
|
|
Yu Zhang, Leo Liu
|
|
|
|
CSAIL, Massachusetts Institute of Technology
|
2015-04-16 04:24:08 +03:00
|
|
|
email: yzhang87@csail.mit.edu
|
|
|
|
email: leoliu_cu@sbcglobal.net
|
2015-04-05 23:14:59 +03:00
|
|
|
|
2015-07-08 04:56:50 +03:00
|
|
|
Guoguo Chen
|
|
|
|
CLSP, Johns Hopkins University
|
|
|
|
email: guoguo@jhu.edu
|
|
|
|
|
2015-01-20 09:41:29 +03:00
|
|
|
== Preeliminaries ==
|
2015-01-24 21:39:40 +03:00
|
|
|
To build the cpu version, you have to install intel MKL blas library or ACML library first. Note that ACML is free, where MKL may not be.
|
|
|
|
|
|
|
|
for MKL:
|
|
|
|
1. Download from https://software.intel.com/en-us/intel-mkl
|
2015-01-20 09:41:29 +03:00
|
|
|
|
2015-01-24 21:39:40 +03:00
|
|
|
for ACML:
|
|
|
|
1. Download from http://developer.amd.com/tools-and-sdks/cpu-development/amd-core-math-library-acml/
|
|
|
|
|
2015-07-08 04:56:50 +03:00
|
|
|
for Kaldi:
|
|
|
|
1. In kaldi-trunk/tools/Makefile, uncomment # OPENFST_VERSION = 1.4.1, and
|
|
|
|
re-install OpenFst using the makefile.
|
|
|
|
2. In kaldi-trunk/src/, do ./configure --shared; make depend -j 8; make -j 8;
|
|
|
|
and re-compile Kaldi (the -j option is for parallelization).
|
|
|
|
|
2015-01-20 09:41:29 +03:00
|
|
|
To build the gpu version, you have to install NIVIDIA CUDA first
|
|
|
|
|
2015-08-06 19:41:57 +03:00
|
|
|
== Build Preparation ==
|
2015-08-07 20:03:27 +03:00
|
|
|
Let $CNTK be the CNTK directory.
|
|
|
|
>mkdir build
|
|
|
|
>$CNTK/configure -h
|
|
|
|
|
|
|
|
You will see various options for configure, as well as their default
|
|
|
|
values. CNTK needs a CPU math directory, either acml or mkl. If you
|
|
|
|
do not specify one and both are available, acml will be used. For GPU
|
|
|
|
use, a cuda and gdk directory are also required. Similary, to build
|
|
|
|
the kaldi plugin a kaldi directory is required. You may also specify
|
|
|
|
whether you want a debug or release build. Rerun configure with the
|
|
|
|
desired options.
|
|
|
|
|
|
|
|
>$CNTK/configure ...
|
|
|
|
|
|
|
|
This will create a Config.make and a Makefile (if you are in the $CNTK
|
|
|
|
directory, a Makefile will not be created). The Config.make file
|
|
|
|
records the configuration parameters and the Makefile reinvokes the
|
|
|
|
$CNTK/Makefile, passing it the build directory where it can find the
|
|
|
|
Config.make.
|
|
|
|
|
|
|
|
After make completes, you will have the following directories:
|
2015-08-06 19:41:57 +03:00
|
|
|
|
|
|
|
.build will contain object files, and can be deleted
|
|
|
|
bin contains the cntk program
|
|
|
|
lib contains libraries and plugins
|
|
|
|
|
|
|
|
The bin and lib directories can safely be moved as long as they remain siblings.
|
|
|
|
|
|
|
|
To clean
|
2015-08-07 20:03:27 +03:00
|
|
|
|
|
|
|
>make clean
|
2015-01-20 09:41:29 +03:00
|
|
|
|
|
|
|
== Run ==
|
2015-08-06 19:41:57 +03:00
|
|
|
All executables are in bin directory:
|
|
|
|
cntk: The main executable for CNTK
|
2015-01-20 09:41:29 +03:00
|
|
|
*.so: shared library for corresponding reader, these readers will be linked and loaded dynamically at runtime.
|
|
|
|
|
2015-08-06 19:41:57 +03:00
|
|
|
./cntk configFile=${your cntk config file}
|
2015-04-05 23:14:59 +03:00
|
|
|
|
|
|
|
== Kaldi Reader ==
|
2015-04-16 04:24:08 +03:00
|
|
|
This is a HTKMLF reader and kaldi writer (for decode)
|
|
|
|
|
2015-08-06 19:41:57 +03:00
|
|
|
To build, set KALDI_PATH in your Config.make
|
2015-04-16 04:24:08 +03:00
|
|
|
|
|
|
|
The feature section is like:
|
|
|
|
|
|
|
|
writer=[
|
|
|
|
writerType=KaldiReader
|
|
|
|
readMethod=blockRandomize
|
|
|
|
frameMode=false
|
|
|
|
miniBatchMode=Partial
|
|
|
|
randomize=Auto
|
|
|
|
verbosity=1
|
|
|
|
ScaledLogLikelihood=[
|
|
|
|
dim=$labelDim$
|
|
|
|
Kaldicmd="ark:-" # will pipe to the Kaldi decoder latgen-faster-mapped
|
|
|
|
scpFile=$outputSCP$ # the file key of the features
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
== Kaldi2 Reader ==
|
|
|
|
This is a kaldi reader and kaldi writer (for decode)
|
|
|
|
|
2015-08-06 19:41:57 +03:00
|
|
|
To build, set KALDI_PATH in your Config.make
|
2015-04-05 23:14:59 +03:00
|
|
|
|
|
|
|
The features section is different:
|
|
|
|
|
|
|
|
features=[
|
|
|
|
dim=
|
|
|
|
rx=
|
|
|
|
scpFile=
|
|
|
|
featureTransform=
|
|
|
|
]
|
|
|
|
|
|
|
|
rx is a text file which contains:
|
|
|
|
|
|
|
|
one Kaldi feature rxspecifier readable by RandomAccessBaseFloatMatrixReader.
|
|
|
|
'ark:' specifiers don't work; only 'scp:' specifiers work.
|
|
|
|
|
|
|
|
scpFile is a text file generated by running:
|
|
|
|
|
|
|
|
feat-to-len FEATURE_RXSPECIFIER_FROM_ABOVE ark,t:- > TEXT_FILE_NAME
|
|
|
|
|
|
|
|
scpFile should contain one line per utterance.
|
|
|
|
|
|
|
|
If you want to run with fewer utterances, just shorten this file.
|
|
|
|
(It will load the feature rxspecifier but ignore utterances not present in scpFile).
|
|
|
|
|
|
|
|
featureTransform is the name of a Kaldi feature transform file:
|
|
|
|
|
|
|
|
Kaldi feature transform files are used for stacking / applying transforms to features.
|
|
|
|
|
|
|
|
An empty string (if permitted by the config file reader?) or the special string: NO_FEATURE_TRANSFORM
|
|
|
|
says to ignore this option.
|
|
|
|
|
|
|
|
********** Labels **********
|
|
|
|
|
|
|
|
The labels section is also different.
|
|
|
|
|
|
|
|
labels=[
|
|
|
|
mlfFile=
|
|
|
|
labelDim=
|
|
|
|
labelMappingFile=
|
|
|
|
]
|
|
|
|
|
|
|
|
Only difference is mlfFile. mlfFile is a different format now. It is a text file which contains:
|
|
|
|
|
|
|
|
one Kaldi label rxspecifier readable by Kaldi's copy-post binary.
|
|
|
|
|
|
|
|
|