Network.emadl 602 Bytes
Newer Older
nilsfreyer's avatar
nilsfreyer committed
1
2
package cNNCalculator;

nilsfreyer's avatar
nilsfreyer committed
3
component Network{
nilsfreyer's avatar
nilsfreyer committed
4
    ports in Z(0:255)^{1, 28, 28} image,
nilsfreyer's avatar
nilsfreyer committed
5
         out Q(0:1)^{10} predictions;
nilsfreyer's avatar
nilsfreyer committed
6
7
8
9
10
11
12
13
14

    implementation CNN {
        image ->
        Convolution(kernel=(5,5), channels=20, padding="valid") ->
        Pooling(pool_type="max", kernel=(2,2), stride=(2,2), padding="valid") ->
        Convolution(kernel=(5,5), channels=50, padding="valid") ->
        Pooling(pool_type="max", kernel=(2,2), stride=(2,2), padding="valid") ->
        FullyConnected(units=500) ->
        Relu() ->
nilsfreyer's avatar
nilsfreyer committed
15
        FullyConnected(units=10) ->
nilsfreyer's avatar
nilsfreyer committed
16
17
18
19
20
        Softmax() ->
        predictions

    }
}