Updated ResNet sample.
This commit is contained in:
Родитель
08b812403f
Коммит
163bbe732c
|
@ -122,7 +122,7 @@ ResNetNode3Inc(inp, inMap, convMap, outMap, convWCount, wScale, bValue, scValue,
|
|||
m2 = Parameter(convMap, 1, init = fixedValue, value = 0, needGradient = false)
|
||||
isd2 = Parameter(convMap, 1, init = fixedValue, value = 0, needGradient = false)
|
||||
|
||||
c2 = Convolution(W2, y1, 3, 3, convMap, 1, 1, zeroPadding = true)
|
||||
c2 = Convolution(W2, y1, 3, 3, convMap, 2, 2, zeroPadding = true)
|
||||
bn2 = BatchNormalization(c2, sc2, b2, m2, isd2, eval = false, spatial = true, expAvgFactor = 1.0)
|
||||
y2 = RectifiedLinear(bn2);
|
||||
|
||||
|
@ -137,7 +137,7 @@ ResNetNode3Inc(inp, inMap, convMap, outMap, convWCount, wScale, bValue, scValue,
|
|||
bn3 = BatchNormalization(c3, sc3, b3, m3, isd3, eval = false, spatial = true)
|
||||
|
||||
# Increasing input dimension convolution
|
||||
cProj = Convolution(wProj, inp, 1, 1, outMap, 1, 1, zeroPadding = false)
|
||||
cProj = Convolution(wProj, inp, 1, 1, outMap, 2, 2, zeroPadding = false)
|
||||
|
||||
p = Plus(bn3, cProj)
|
||||
y3 = RectifiedLinear(p);
|
||||
|
|
|
@ -32,7 +32,7 @@ Train=[
|
|||
|
||||
SGD=[
|
||||
epochSize=0
|
||||
minibatchSize=1
|
||||
minibatchSize=2
|
||||
learningRatesPerMB=0.1*20:0.03*10:0.01*30:0.003
|
||||
momentumPerMB=0.9
|
||||
maxEpochs=100
|
||||
|
|
|
@ -104,7 +104,7 @@ DNN=[
|
|||
|
||||
pool5 = AveragePooling(rn4_3, poolW, poolH, poolhs, poolvs)
|
||||
|
||||
ol = DnnLayer(1605632, labelDim, pool5, fcWScale, fcBValue)
|
||||
ol = DnnLayer(8192, labelDim, pool5, fcWScale, fcBValue)
|
||||
|
||||
CE = CrossEntropyWithSoftmax(labels, ol, tag = Criteria)
|
||||
Err = ErrorPrediction(labels, ol, tag = Eval)
|
||||
|
|
Загрузка…
Ссылка в новой задаче