forked from microsoft/CNTK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://git.codeplex.com/cntk into fseide/te…
…nsors
- Loading branch information
Showing
65 changed files
with
1,265 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
m=LoadModel($CurModel$, format=cntk) | ||
SetDefaultModel(m) | ||
|
||
conv1.bn_e = BatchNormalization(conv1.c, conv1.sc, conv1.b, conv1.m, conv1.isd, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(conv1.y, 0, conv1.bn_e) | ||
|
||
conv2.bn_e = BatchNormalization(conv2.c, conv2.sc, conv2.b, conv2.m, conv2.isd, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(conv2.y, 0, conv2.bn_e) | ||
|
||
conv3.bn_e = BatchNormalization(conv3.c, conv3.sc, conv3.b, conv3.m, conv3.isd, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(conv3.y, 0, conv3.bn_e) | ||
|
||
h1.bn_e = BatchNormalization(h1.t, h1.sc, h1.b, h1.m, h1.isd, eval = true, spatial = false) | ||
SetNodeInput(h1.y, 0, h1.bn_e) | ||
SetPropertyForSubTree(CE, batchNormEvalMode, true) | ||
|
||
SaveModel(m, $NewModel$, format=cntk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,6 @@ | ||
m=LoadModel($CurModel$, format=cntk) | ||
SetDefaultModel(m) | ||
|
||
conv1.bn_e = BatchNormalization(conv1.c, conv1.sc, conv1.b, conv1.m, conv1.isd, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(conv1.y, 0, conv1.bn_e) | ||
|
||
rn1_1.bn1_e = BatchNormalization(rn1_1.c1, rn1_1.sc1, rn1_1.b1, rn1_1.m1, rn1_1.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_1.y1, 0, rn1_1.bn1_e) | ||
rn1_1.bn2_e = BatchNormalization(rn1_1.c2, rn1_1.sc2, rn1_1.b2, rn1_1.m2, rn1_1.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_1.p, 0, rn1_1.bn2_e) | ||
|
||
rn1_2.bn1_e = BatchNormalization(rn1_2.c1, rn1_2.sc1, rn1_2.b1, rn1_2.m1, rn1_2.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_2.y1, 0, rn1_2.bn1_e) | ||
rn1_2.bn2_e = BatchNormalization(rn1_2.c2, rn1_2.sc2, rn1_2.b2, rn1_2.m2, rn1_2.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_2.p, 0, rn1_2.bn2_e) | ||
|
||
rn1_3.bn1_e = BatchNormalization(rn1_3.c1, rn1_3.sc1, rn1_3.b1, rn1_3.m1, rn1_3.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_3.y1, 0, rn1_3.bn1_e) | ||
rn1_3.bn2_e = BatchNormalization(rn1_3.c2, rn1_3.sc2, rn1_3.b2, rn1_3.m2, rn1_3.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn1_3.p, 0, rn1_3.bn2_e) | ||
|
||
rn2_1.bn1_e = BatchNormalization(rn2_1.c1, rn2_1.sc1, rn2_1.b1, rn2_1.m1, rn2_1.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_1.y1, 0, rn2_1.bn1_e) | ||
rn2_1.bn2_e = BatchNormalization(rn2_1.c2, rn2_1.sc2, rn2_1.b2, rn2_1.m2, rn2_1.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_1.p, 0, rn2_1.bn2_e) | ||
|
||
rn2_2.bn1_e = BatchNormalization(rn2_2.c1, rn2_2.sc1, rn2_2.b1, rn2_2.m1, rn2_2.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_2.y1, 0, rn2_2.bn1_e) | ||
rn2_2.bn2_e = BatchNormalization(rn2_2.c2, rn2_2.sc2, rn2_2.b2, rn2_2.m2, rn2_2.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_2.p, 0, rn2_2.bn2_e) | ||
|
||
rn2_3.bn1_e = BatchNormalization(rn2_3.c1, rn2_3.sc1, rn2_3.b1, rn2_3.m1, rn2_3.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_3.y1, 0, rn2_3.bn1_e) | ||
rn2_3.bn2_e = BatchNormalization(rn2_3.c2, rn2_3.sc2, rn2_3.b2, rn2_3.m2, rn2_3.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn2_3.p, 0, rn2_3.bn2_e) | ||
|
||
rn3_1.bn1_e = BatchNormalization(rn3_1.c1, rn3_1.sc1, rn3_1.b1, rn3_1.m1, rn3_1.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_1.y1, 0, rn3_1.bn1_e) | ||
rn3_1.bn2_e = BatchNormalization(rn3_1.c2, rn3_1.sc2, rn3_1.b2, rn3_1.m2, rn3_1.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_1.p, 0, rn3_1.bn2_e) | ||
|
||
rn3_2.bn1_e = BatchNormalization(rn3_2.c1, rn3_2.sc1, rn3_2.b1, rn3_2.m1, rn3_2.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_2.y1, 0, rn3_2.bn1_e) | ||
rn3_2.bn2_e = BatchNormalization(rn3_2.c2, rn3_2.sc2, rn3_2.b2, rn3_2.m2, rn3_2.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_2.p, 0, rn3_2.bn2_e) | ||
|
||
rn3_3.bn1_e = BatchNormalization(rn3_3.c1, rn3_3.sc1, rn3_3.b1, rn3_3.m1, rn3_3.isd1, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_3.y1, 0, rn3_3.bn1_e) | ||
rn3_3.bn2_e = BatchNormalization(rn3_3.c2, rn3_3.sc2, rn3_3.b2, rn3_3.m2, rn3_3.isd2, eval = true, spatial = true, imageLayout = "cudnn") | ||
SetNodeInput(rn3_3.p, 0, rn3_3.bn2_e) | ||
SetPropertyForSubTree(CE, batchNormEvalMode, true) | ||
|
||
SaveModel(m, $NewModel$, format=cntk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
Examples/Image/Miscellaneous/CIFAR-10/04_ResNet_56.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
RootDir = "." | ||
|
||
ConfigDir = "$RootDir$" | ||
DataDir = "$RootDir$" | ||
OutputDir = "$RootDir$/Output" | ||
ModelDir = "$OutputDir$/Models" | ||
|
||
ndlMacros=$ConfigDir$/Macros.ndl | ||
|
||
precision=float | ||
deviceId=Auto | ||
prefetch=true | ||
parallelTrain=false | ||
|
||
command=Train:AddBNEval:Test | ||
|
||
stderr=$OutputDir$/04_ResNet_56 | ||
traceLevel=1 | ||
numMBsToShowResult=200 | ||
|
||
Proj16to32Filename = $ConfigDir$/16to32.txt | ||
Proj32to64Filename = $ConfigDir$/32to64.txt | ||
|
||
Train=[ | ||
action=train | ||
modelPath=$ModelDir$/04_ResNet_56 | ||
|
||
NDLNetworkBuilder=[ | ||
networkDescription=$ConfigDir$/04_ResNet_56.ndl | ||
] | ||
|
||
SGD=[ | ||
epochSize=0 | ||
minibatchSize=128 | ||
learningRatesPerMB=0.1*80:0.01*40:0.001 | ||
momentumPerMB=0.9 | ||
maxEpochs=1 | ||
L2RegWeight=0.0001 | ||
dropoutRate=0 | ||
|
||
ParallelTrain=[ | ||
parallelizationMethod=DataParallelSGD | ||
distributedMBReading=true | ||
parallelizationStartEpoch=1 | ||
DataParallelSGD=[ | ||
gradientBits=1 | ||
] | ||
] | ||
] | ||
|
||
reader=[ | ||
readerType=ImageReader | ||
file=$DataDir$/train_map.txt | ||
randomize=Auto | ||
features=[ | ||
width=32 | ||
height=32 | ||
channels=3 | ||
cropType=Random | ||
cropRatio=0.8 | ||
jitterType=UniRatio | ||
interpolations=Linear | ||
meanFile=$ConfigDir$/CIFAR-10_mean.xml | ||
] | ||
labels=[ | ||
labelDim=10 | ||
] | ||
] | ||
] | ||
|
||
AddBNEval=[ | ||
action=edit | ||
CurModel=$ModelDir$/04_ResNet_56 | ||
NewModel=$ModelDir$/04_ResNet_56.Eval | ||
editPath=$ConfigDir$/03_ResNet.mel | ||
] | ||
|
||
Test=[ | ||
action=test | ||
modelPath=$ModelDir$/04_ResNet_56 | ||
# Set minibatch size for testing. | ||
minibatchSize=512 | ||
|
||
NDLNetworkBuilder=[ | ||
networkDescription=$ConfigDir$/04_ResNet_56.ndl | ||
] | ||
|
||
reader=[ | ||
readerType=ImageReader | ||
file=$DataDir$/test_map.txt | ||
randomize=Auto | ||
features=[ | ||
width=32 | ||
height=32 | ||
channels=3 | ||
cropType=Center | ||
cropRatio=1 | ||
jitterType=UniRatio | ||
interpolations=Linear | ||
meanFile=$ConfigDir$/CIFAR-10_mean.xml | ||
] | ||
labels=[ | ||
labelDim=10 | ||
] | ||
] | ||
] |
Oops, something went wrong.