Cifar10Classifier.emadl 381 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package simpleCifar10;
import Network;
import CalculateClass;

component Cifar10Classifier{
    ports in Z(0:255)^{3, 32, 32} image,
         out Z(0:9) classIndex;

    instance CifarNetwork<10> net;

    instance ArgMax<10> calculateClass;

    connect image -> net.data;
    connect net.softmax -> calculateClass.inputVector;
    connect calculateClass.maxIndex -> classIndex;
}