https://github.com/Microsoft/CNTK
Raw File
Tip revision: 2a409312994822702b865ca9f7e7ee3a31a35ceb authored by Mark Hillebrand on 18 January 2016, 08:34:43 UTC
License change
Tip revision: 2a40931
test.config
#
# test this with this command line:
# configFile=$(SolutionDir)BrainScript/test.config RunDir=$(SolutionDir)\Tests\Speech\RunDir DataDir=$(SolutionDir)\Tests\Speech\Data DeviceId=Auto

precision=float
command=speechTrain
deviceId=$DeviceId$

parallelTrain=false

speechTrain=[
    action=train
    modelPath=$RunDir$/models/cntkSpeech.dnn
    deviceId=$DeviceId$
    traceLevel=1
    # inside here is the new stuff
    ExperimentalNetworkBuilder=[
        //deviceId = -21 ; precision = 'floax' // for now
        layerSizes=363:512:512:132
        trainingCriterion=CE
        evalCriterion=Err
        //layerTypes=Sigmoid
        //initValueScale=1.0
        //applyMeanVarNorm=true
        //uniformInit=true
        //needPrior=true

        numHiddenLayers = 3
        myFeatures = Input(layerSizes[0]) ; myLabels = Input(layerSizes[Length(layerSizes)-1])
        featNorm = MeanVarNorm(myFeatures)
        layers = array[1..numHiddenLayers] (layer => if layer > 1 then SBFF(layers[layer-1].Eh, layerSizes[layer], layerSizes[layer-1]) else SBFF(featNorm, layerSizes[layer], layerSizes[layer-1]))
        outLayer = BFF(layers[numHiddenLayers].Eh, labelDim, hiddenDim)
        outZ = outLayer.z
        CE = CrossEntropyWithSoftmax(myLabels, outZ)
        Err = ErrorPrediction(myLabels, outZ)
        logPrior = LogPrior(myLabels)
        ScaledLogLikelihood = outZ - logPrior
    ]
    
    SGD=[
        epochSize=20480
        minibatchSize=64:256:1024:
        learningRatesPerMB=1.0:0.5:0.1
        numMBsToShowResult=10
        momentumPerMB=0.9:0.656119
        dropoutRate=0.0
        maxEpochs=3
        keepCheckPointFiles=true       
        
        AutoAdjust=[
            reduceLearnRateIfImproveLessThan=0
            loadBestModel=true
            increaseLearnRateIfImproveMoreThan=1000000000
            learnRateDecreaseFactor=0.5
            learnRateIncreaseFactor=1.382
            autoAdjustLR=AdjustAfterEpoch
        ]
        clippingThresholdPerSample=1#INF
    ]
    reader=[
      readerType=HTKMLFReader
      readMethod=blockRandomize
      miniBatchMode=Partial
      randomize=Auto
      verbosity=0
      features=[
          dim=363
          type=Real
          scpFile=glob_0000.scp
      ]
  
      labels=[
          mlfFile=$DataDir$/glob_0000.mlf
          labelMappingFile=$DataDir$/state.list
        
          labelDim=132
          labelType=Category
      ]
    ]
]
back to top