Skip to content

Commit

Permalink
Minor fixes in demos (MB rescaling, tabs, image link, Speech/LSTM)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkranen committed Dec 9, 2015
1 parent 0f1238c commit f612afa
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions Demos/Simple2d/Config/Multigpu.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ Multigpu_Demo_Train=[
]

SGD = [
# epochSize = 0 means epochSize is the size of the training set
# epochSize = 0 means epochSize is the size of the training set
epochSize = 0
minibatchSize = 25
learningRatesPerMB = 0.5:0.2*20:0.1
momentumPerMB = 0.9
dropoutRate = 0.0
maxEpochs = 10
# Additional optional parameters are: distributedMBReading

# Additional optional parameters are: distributedMBReading
parallelTrain = [
parallelizationMethod = "DataParallelSGD"
parallelizationStartEpoch = 2

# Additional optional parameters are: useZeroThresholdFor1BitQuantization
# Additional optional parameters are: useZeroThresholdFor1BitQuantization
dataParallelSGD = [
gradientBits = 1
]
Expand Down Expand Up @@ -103,12 +103,12 @@ Multigpu_Demo_Test=[
readerType = "UCIFastReader"
file = "$DataDir$/SimpleDataTest.txt"
randomize = "none"

features = [
dim = 2
start = 0
]

labels = [
start = 2
dim = 1
Expand All @@ -132,19 +132,19 @@ Multigpu_Demo_Output=[
readerType = "UCIFastReader"
file = "$DataDir$/SimpleDataTest.txt"
randomize = "none"

features = [
dim = 2
start = 0
]

labels = [
start = 2
dim = 1
labelDim = 2
labelMappingFile = "$DataDir$/SimpleMapping.txt"
]
]

outputPath = "$OutputDir$/MultigpuOutput" # Dump output as text
]
3 changes: 1 addition & 2 deletions Demos/Simple2d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ training and test data as well as the plots that are provided in the folder.
The data is synthetic 2d data representing two classes that are separated by a sinusoidal boundary.
SimpleDemoDataReference.png shows a plot of the training data.

![training data plot](AdditionalFiles/SimpleDemoDataReference.png)

## Using a trained model

The Test (e.g. Simple_Demo_Test) and the Output (e.g. Simple_Demo_Output) commands
specified in the config files use the trained model to compute labels for data specified in the SimpleDataTest.txt file.
The Test command computes prediction error, cross entropy and perplexity for the test set and outputs them to the console.
The Output command writes for each test instance the likelihood per label to a file `outputPath = $OutputDir$/SimpleOutput`.
To use the Output command either set `command=Simple_Demo_Output` in the config file or add it to the command line.
The model that is used to compute the labels in these commands is defined
in the modelPath variable at the beginning of the file `modelPath=$modelDir$/simple.dnn`.
15 changes: 8 additions & 7 deletions Demos/Speech/Config/FeedForward.config
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ speechTrain = [
]
]

autoAdjust = [
reduceLearnRateIfImproveLessThan = 0
loadBestModel = true
increaseLearnRateIfImproveMoreThan = 1000000000
learnRateDecreaseFactor = 0.5
learnRateIncreaseFactor = 1.382
autoAdjustLR = "adjustAfterEpoch"
autoAdjust=[
autoAdjustMinibatch = true
minibatchSizeTuningFrequency = 1
minibatchSearchCriterionErrorMargin = 2
autoAdjustLR = "none"
numMiniBatch4LRSearch = 1000
numPrevLearnRate = 5
numBestSearchEpoch = 1
]

clippingThresholdPerSample = 1#INF
Expand Down
6 changes: 3 additions & 3 deletions Demos/Speech/Config/LSTM-NDL.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ speechTrain = [
]

SGD = [
epochSize = 20480
minibatchSize = 2048
epochSize = 0
minibatchSize = 16
learningRatesPerMB = 0.5
numMBsToShowResult = 10
momentumPerMB = 0:0.9
Expand All @@ -47,7 +47,7 @@ speechTrain = [
readerType = "HTKMLFReader"
readMethod = "blockRandomize"
miniBatchMode = "partial"
nbruttsineachrecurrentiter = 32
nbruttsineachrecurrentiter = 16
randomize = "auto"
verbosity = 0

Expand Down
2 changes: 1 addition & 1 deletion Demos/Speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This modified version of dataset is distributed under the terms of a AN4 license
Data: |Speech data from the CMU Audio Database aka AN4 (http://www.speech.cs.cmu.edu/databases/an4)
Purpose: |Showcase how to train feed forward and LSTM networks for speech data
Network: |SimpleNetworkBuilder for 2-layer FF, NdlNetworkBuilder for 3-layer LSTM network
Training: |Data-parallel 1-Bit SGD with adjusted learning rate
Training: |Data-parallel 1-Bit SGD with automatic mini batch rescaling (FF)
Comments: |There are two config files: FeedForward.config and LSTM-NDL.config for FF and LSTM training respectively

## Running the example
Expand Down
File renamed without changes.

0 comments on commit f612afa

Please sign in to comment.