MultipleStreams.emadl 711 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
component MultipleStreams{
    ports in Z(0:255)^{3, 32, 32} data[2],
         out Q(0:1)^{10} softmax[2];

    implementation CNN {
        data[0] ->
        Convolution(kernel=(5,5), channels=8, padding="valid") ->
        Convolution(kernel=(5,5), channels=8, padding="valid") ->
        FullyConnected(units=128) ->
        Dropout()->
        FullyConnected(units=10) ->
        Softmax() ->
        softmax[0];

        data[1] ->
        Convolution(kernel=(5,5), channels=8, padding="valid") ->
        Convolution(kernel=(5,5), channels=8, padding="valid") ->
        FullyConnected(units=128) ->
        Dropout()->
        FullyConnected(units=10) ->
        Softmax() ->
        softmax[1];
    }
}