MultipleInputs.emadl 770 Bytes
Newer Older
Bernhard Rumpe's avatar
BR-sy  
Bernhard Rumpe committed
1
/* (c) https://github.com/MontiCore/monticore */
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
component MultipleInputs{
    ports in Z(0:255)^{3, 32, 32} data[2],
         out Q(0:1)^{10} softmax;

    implementation CNN {
        (
            data[0] ->
            Convolution(kernel=(5,5), channels=8, padding="valid") ->
            Convolution(kernel=(5,5), channels=8, padding="valid") ->
            FullyConnected(units=128) ->
            Dropout()
        |
            data[1] ->
            Convolution(kernel=(5,5), channels=8, padding="valid") ->
            Convolution(kernel=(5,5), channels=8, padding="valid") ->
            FullyConnected(units=128) ->
            Dropout()
        ) ->
        Concatenate() ->
        FullyConnected(units=10) ->
        Softmax() ->
        softmax;
    }
Bernhard Rumpe's avatar
BR-sy  
Bernhard Rumpe committed
25
}