Featureextraction.emam 1.09 KB
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package dp;

component Featureextraction {
    ports
        in Z(0:255)^{640, 480} imageIn,
        out Q(0:1)^{13,1} affordanceOut;

        implementation Math {
                affordanceOut=[0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0];
        }

    //implementation CNN {

    //    def conv(kernel, channels, hasPool=true, convStride=(1,1)){
    //        Convolution(kernel=kernel, channels=channels, stride=convStride) ->
    //        Relu() ->
    //        Pooling(pool_type="max", kernel=(3,3), stride=(2,2), ?=hasPool)
    //    }
    //    def fc(){
    //        FullyConnected(units=4096) ->
    //        Relu() ->
    //        Dropout()
    //    }

    //    imageIn ->
    //    conv(kernel=(11,11), channels=96, convStride=(4,4)) ->
    //    conv(kernel=(5,5), channels=256, convStride=(4,4)) ->
    //    conv(kernel=(3,3), channels=384, hasPool=false) ->
    //    conv(kernel=(3,3), channels=384, hasPool=false) ->
    //    conv(kernel=(3,3), channels=256) ->
    //    fc() ->
    //    fc() ->
    //    FullyConnected(units=13) ->
    //    Sigmoid() ->
    //    affordanceOut

    //}
}