Skip to content

[export_cpp] main.cpp seems always doing MNIST

When exporting a network to cpp, the main function always mentions MNIST and the number of classes remains equal to 10

Here is the main obtained for a CNN network used with CIFAR100, so expecting 100 classes:

#include <iostream>
#include "dnn.hpp"
#include "inputs.h"

int main()
{
    // Example for MNIST dataset
    // Feel free to change this file for your own projects
    const unsigned int nb_classes = 10;

    float results[nb_classes];
    model_forward(inputs, results);

    for (unsigned int i = 0; i < nb_classes; ++i)
    {
        std::cout << i << ": " << results[i] << std::endl;
    }

    return 0;
}