Simplified cifar10

parent d5a02f2f
Pipeline #109889 failed with stage
in 3 minutes and 10 seconds
......@@ -5,28 +5,9 @@ component CifarNetwork<Z(2:oo) classes = 10>{
out Q(0:1)^{classes} softmax;
implementation CNN {
def conv(kernel, channels, stride=1, act=true){
Convolution(kernel=(kernel,kernel), channels=channels, stride=(stride,stride))
}
def resLayer(channels, stride=1, addSkipConv=false){
(
conv(kernel=3, channels=channels, stride=stride) ->
conv(kernel=3, channels=channels, act=false)
|
conv(kernel=1, channels=channels, stride=stride, act=false, ? = addSkipConv)
) ->
Add()
}
data ->
resLayer(channels=8, addSkipConv=true) ->
resLayer(channels=16, stride=2, addSkipConv=true) ->
resLayer(channels=16, ->=2) ->
resLayer(channels=32, stride=2, addSkipConv=true) ->
resLayer(channels=32, ->=2) ->
resLayer(channels=64, stride=2, addSkipConv=true) ->
resLayer(channels=64, ->=2) ->
GlobalPooling(pool_type="avg") ->
Convolution(kernel=(5,5), channels=8, padding="valid") ->
Convolution(kernel=(5,5), channels=8, padding="valid") ->
FullyConnected(units=128) ->
Dropout()->
FullyConnected(units=classes) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment