Connector.emadl 1.09 KB
Newer Older
eyuhar's avatar
eyuhar committed
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
package cNNCalculator;

component Connector {
    ports in Z(0:255)^{1, 28, 28} image1,
          in Z(0:255)^{1, 28, 28} image2,
          in Z(0:255)^{1, 28, 28} image3,
          in Z(0:255)^{1, 28, 28} image4,
          in Z(0:255)^{1, 28, 28} image5,
          in Z(0:255)^{1, 28, 28} image6,
          out Z(0:1998) res;

    instance Network<10> predictor1;
    instance Network<10> predictor2;
    instance Network<10> predictor3;
    instance Network<10> predictor4;
    instance Network<10> predictor5;
    instance Network<10> predictor6;
    instance Calculator cal;

    connect image1 -> predictor1.data;
    connect image2 -> predictor2.data;
    connect image3 -> predictor3.data;
    connect image4 -> predictor4.data;
    connect image5 -> predictor5.data;
    connect image6 -> predictor6.data;

    connect predictor1.softmax -> cal.in1_1;
    connect predictor2.softmax -> cal.in1_2;
    connect predictor3.softmax -> cal.in1_3;
    connect predictor4.softmax -> cal.in2_1;
    connect predictor5.softmax -> cal.in2_2;
    connect predictor6.softmax -> cal.in2_3;

    connect cal.out1 -> res;

}