53 std::vector<unsigned int> compute_lenet5(
unsigned int batches, std::string input_file)
55 std::vector<std::string> weight_files = {
"cnn_data/lenet_model/conv1_w.npy",
56 "cnn_data/lenet_model/conv2_w.npy",
57 "cnn_data/lenet_model/ip1_w.npy",
58 "cnn_data/lenet_model/ip2_w.npy" 61 std::vector<std::string> bias_files = {
"cnn_data/lenet_model/conv1_b.npy",
62 "cnn_data/lenet_model/conv2_b.npy",
63 "cnn_data/lenet_model/ip1_b.npy",
64 "cnn_data/lenet_model/ip2_b.npy" 66 NELeNet5Model network{};
67 network.init(batches);
70 network.fill(weight_files, bias_files);
71 network.feed(std::move(input_file));
74 return network.get_classifications();
84 std::vector<unsigned int> classified_labels = compute_lenet5(10,
"cnn_data/mnist_data/input10.npy");
87 std::vector<unsigned int> expected_labels = { 7, 2, 1, 0, 4, 1, 4, 9, 5, 9 };
90 validate(classified_labels, expected_labels);
TEST_CASE(Configuration, framework::DatasetMode::ALL)
Basic function to compute a SoftmaxLayer.
This file contains all available output stages for GEMMLowp on OpenCL.
#define TEST_SUITE(SUITE_NAME)
validate(dst.info() ->valid_region(), dst_valid_region)
Accessor implementation for Tensor objects.
DatasetMode
Possible dataset modes.
Basic function to simulate a convolution layer.
Basic implementation of the tensor interface.
Basic function to run NEActivationLayerKernel.
Basic function to compute a Fully Connected layer on NEON.
TEST_SUITE_END() DATA_TEST_CASE(Configuration
Basic function to simulate a pooling layer with the specified pooling operation.
void run() override
Run the kernels contained in the function.