diff --git a/models/generated/modelc_01266c1b.cpp b/models/generated/modelc_01266c1b.cpp index 11004b1..ab61d3a 100644 --- a/models/generated/modelc_01266c1b.cpp +++ b/models/generated/modelc_01266c1b.cpp @@ -2,23 +2,25 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10b_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers0.model.pkl // #include "compile.h" #if COMPILE_DMZ -#define EIGEN_NO_DEBUG 1 // turn off range checking and anything else that could slow us down! -#define USE_OPTIMIZED_3x3_CONVOLUTION 1 +#define USE_OPTIMIZED_3x3_CONVOLUTION_01266c1b 1 #include "modelc_01266c1b.hpp" -#if USE_OPTIMIZED_3x3_CONVOLUTION - #include "cv/conv.h" +#if USE_OPTIMIZED_3x3_CONVOLUTION_01266c1b + #include "conv.h" #include "processor_support.h" #endif + +// Conv layer 1 of 1 + static uint8_t data_4e401475[288] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv W 0xA9, 0xDC, 0xB0, 0x3E, 0xC1, 0xF2, 0x86, 0x3F, 0xCB, 0x65, 0xBF, 0x3F, 0x61, 0x95, 0xE8, 0xBF, 0x2C, 0x3D, 0x06, 0xC0, 0xB8, 0xA4, 0x23, 0xC0, 0x21, 0x69, 0xB6, 0x3F, 0x13, 0xFD, 0xD2, 0x3F, 0xF6, 0xC9, 0xB6, 0x3F, 0x79, 0xD2, 0x0D, 0x40, 0x43, 0xB3, 0xF1, 0xBE, 0x72, 0x27, 0x90, 0xBF, @@ -39,6 +41,22 @@ static uint8_t data_71a917a2[32] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv b 0xA1, 0xA5, 0x8C, 0xBF, 0xCA, 0x9A, 0xA2, 0x3F, }; // data_71a917a2 (conv b) +typedef Eigen::Matrix ModelCConvInputFeatureMap_01266c1b_1; +typedef Eigen::Matrix ModelCConvInput_01266c1b_1; + +typedef Eigen::Matrix ModelCAllKernels_01266c1b_1; +typedef Eigen::Matrix ModelCAllKernelsForOutputFeatureMap_01266c1b_1; +typedef Eigen::Matrix ModelCSingleKernel_01266c1b_1; +typedef Eigen::Matrix ModelCConvB_01266c1b_1; +typedef Eigen::Matrix ModelCSingleConvolved_01266c1b_1; +typedef Eigen::Matrix ModelCSingleDownsampled_01266c1b_1; +#if USE_OPTIMIZED_3x3_CONVOLUTION_01266c1b + typedef Eigen::Matrix ModelCSingleKernelPadded_01266c1b_1; +#endif + +typedef Eigen::Matrix ModelCConvResult_01266c1b_1; + + static uint8_t data_cdc19833[40960] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden W 0x53, 0x80, 0x70, 0xBE, 0xF7, 0x0C, 0xC5, 0xBE, 0x4F, 0xA0, 0xEA, 0xBC, 0xB9, 0x44, 0x25, 0xBD, 0x57, 0x6C, 0x2B, 0xBE, 0x84, 0xE8, 0xC9, 0xBD, 0x22, 0x0C, 0xA4, 0xBE, 0xF3, 0x0F, 0x11, 0xBF, 0xE4, 0xF5, 0x13, 0xBE, 0x55, 0xE2, 0x6D, 0xBE, 0x1E, 0x1D, 0x64, 0x3C, 0x6C, 0x4D, 0x43, 0xBE, @@ -1758,6 +1776,7 @@ static uint8_t data_e6740ec9[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden b 0xF2, 0x05, 0x87, 0x3F, 0x6A, 0xD7, 0xE1, 0xBE, }; // data_e6740ec9 (hidden b) + static uint8_t data_1028bdda[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic W 0x0D, 0x15, 0x55, 0xBF, 0x94, 0xBC, 0x03, 0x40, 0x2F, 0x46, 0x8F, 0x3E, 0x18, 0xEB, 0xC8, 0x3E, 0xD2, 0xA4, 0xC2, 0x3E, 0x8B, 0x24, 0x8F, 0x3D, 0x58, 0x52, 0xE5, 0xBF, 0x2C, 0x79, 0x09, 0x3F, 0x71, 0xC3, 0x5A, 0x3E, 0x8E, 0xB6, 0xDD, 0x3E, 0x11, 0x8A, 0xE4, 0xBF, 0xFE, 0x5F, 0xEB, 0x3F, @@ -1821,14 +1840,6 @@ static uint8_t data_e4032b7c[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic b }; // data_e4032b7c (logistic b) -typedef Eigen::Matrix ModelCAllKernels_01266c1b; -typedef Eigen::Matrix ModelCSingleKernel_01266c1b; -typedef Eigen::Matrix ModelCConvB_01266c1b; - -typedef Eigen::Matrix ModelCSingleConvolved_01266c1b; -typedef Eigen::Matrix ModelCSingleDownsampled_01266c1b; -typedef Eigen::Matrix ModelCConvResult_01266c1b; - typedef Eigen::Matrix ModelCHiddenW_01266c1b; typedef Eigen::Matrix ModelCHiddenB_01266c1b; typedef Eigen::Matrix ModelCHiddenResult_01266c1b; @@ -1836,20 +1847,21 @@ typedef Eigen::Matrix ModelCHiddenResult_01266c1b typedef Eigen::Matrix ModelCLogisticW_01266c1b; typedef Eigen::Matrix ModelCLogisticB_01266c1b; -#if USE_OPTIMIZED_3x3_CONVOLUTION - typedef Eigen::Matrix ModelCSingleKernelPadded_01266c1b; -#endif +DMZ_INTERNAL float rectified_linear_unit_activation_01266c1b(float value) { + return MAX(value, 0.0f); +} -DMZ_INTERNAL ModelCSingleConvolved_01266c1b convc_01266c1b(const ModelCInput_01266c1b& input, const ModelCSingleKernel_01266c1b& kernel) { - ModelCSingleConvolved_01266c1b output; +DMZ_INTERNAL ModelCSingleConvolved_01266c1b_1 convc_01266c1b_1(const ModelCConvInputFeatureMap_01266c1b_1& input, + const ModelCSingleKernel_01266c1b_1& kernel) { + ModelCSingleConvolved_01266c1b_1 output; -#if USE_OPTIMIZED_3x3_CONVOLUTION - ModelCSingleKernelPadded_01266c1b padded_kernel; +#if USE_OPTIMIZED_3x3_CONVOLUTION_01266c1b + ModelCSingleKernelPadded_01266c1b_1 padded_kernel; bool has_neon = dmz_has_neon_runtime(); if(has_neon) { - padded_kernel = ModelCSingleKernelPadded_01266c1b::Zero(); + padded_kernel = ModelCSingleKernelPadded_01266c1b_1::Zero(); padded_kernel.block<3, 3>(0, 0) = kernel; } #endif @@ -1857,7 +1869,7 @@ DMZ_INTERNAL ModelCSingleConvolved_01266c1b convc_01266c1b(const ModelCInput_012 for(uint16_t output_row = 0; output_row < 24; output_row++) { uint16_t vector_processed_cols = 0; -#if USE_OPTIMIZED_3x3_CONVOLUTION +#if USE_OPTIMIZED_3x3_CONVOLUTION_01266c1b if(has_neon) { llcv_conv_3x3_f32_row(input.row(output_row).data(), input.row(output_row + 1).data(), @@ -1871,17 +1883,15 @@ DMZ_INTERNAL ModelCSingleConvolved_01266c1b convc_01266c1b(const ModelCInput_012 // Scalar handling of non-vectorized leftovers for(uint16_t output_col = vector_processed_cols; output_col < 15; output_col++) { - ModelCSingleKernel_01266c1b input_submatrix = input.block<3, 3>(output_row, output_col); - ModelCSingleKernel_01266c1b elemwise_mult = kernel.cwiseProduct(input_submatrix); - float sum = elemwise_mult.sum(); - output(output_row, output_col) = sum; + ModelCSingleKernel_01266c1b_1 input_submatrix = input.block<3, 3>(output_row, output_col); + output(output_row, output_col) = kernel.cwiseProduct(input_submatrix).sum(); } } return output; } -DMZ_INTERNAL ModelCSingleDownsampled_01266c1b downc_01266c1b(const ModelCSingleConvolved_01266c1b& input) { - ModelCSingleDownsampled_01266c1b output; +DMZ_INTERNAL ModelCSingleDownsampled_01266c1b_1 downc_01266c1b_1(const ModelCSingleConvolved_01266c1b_1& input) { + ModelCSingleDownsampled_01266c1b_1 output; for(uint16_t output_row = 0; output_row < 8; output_row++) { for(uint16_t output_col = 0; output_col < 5; output_col++) { output(output_row, output_col) = input.block<3, 3>(output_row * 3, output_col * 3).maxCoeff(); @@ -1890,37 +1900,156 @@ DMZ_INTERNAL ModelCSingleDownsampled_01266c1b downc_01266c1b(const ModelCSingleC return output; } -DMZ_INTERNAL ModelCOutput_01266c1b applyc_01266c1b(const ModelCInput_01266c1b& input) { - ModelCConvResult_01266c1b accumulated_convolutions; +DMZ_INTERNAL ModelCConvResult_01266c1b_1 convolve_01266c1b_1(const ModelCConvInput_01266c1b_1& input) { + ModelCConvResult_01266c1b_1 accumulated_results; + + Eigen::Map all_kernels((float *)data_4e401475); + Eigen::Map conv_b((float *)data_71a917a2); - Eigen::Map all_kernels((float *)data_4e401475); - Eigen::Map conv_b((float *)data_71a917a2); + for(uint8_t output_feature_map_index = 0; output_feature_map_index < 8; output_feature_map_index++) { + Eigen::Map kernels(all_kernels.data() + output_feature_map_index * 9); - // TODO: Simultaneous multi-kernel calculations? - for(uint8_t kernel_index = 0; kernel_index < 8; kernel_index++) { - Eigen::Map kernel(all_kernels.data() + kernel_index * 9); + ModelCSingleConvolved_01266c1b_1 accumulated_convolutions_for_kernel = ModelCSingleConvolved_01266c1b_1::Zero(); - // Convolve, downsample - ModelCSingleConvolved_01266c1b convolved = convc_01266c1b(input, kernel); - ModelCSingleDownsampled_01266c1b downsampled = downc_01266c1b(convolved); + // Convolve + for (uint8_t input_feature_map_index = 0; input_feature_map_index < 1; input_feature_map_index++) { + Eigen::Map kernel(kernels.data() + input_feature_map_index * 9); + ModelCConvInputFeatureMap_01266c1b_1 aliased_input_feature_map(input.data() + input_feature_map_index * 513); + ModelCSingleConvolved_01266c1b_1 convolved = convc_01266c1b_1(aliased_input_feature_map, kernel); + accumulated_convolutions_for_kernel += convolved; + } + + //if (output_feature_map_index == 0) { + // std::cerr << "_01266c1b_1 Kernel " << (int)output_feature_map_index << ":\n" << kernels << "\n"; + // std::cerr << "_01266c1b_1 Convolved " << (int)output_feature_map_index << ":\n" << accumulated_convolutions_for_kernel << "\n"; + //} + + // Downsample + ModelCSingleDownsampled_01266c1b_1 downsampled = downc_01266c1b_1(accumulated_convolutions_for_kernel); // Copy into place in our output buffer (via aliasing) - Eigen::Map aliased_downsampled(accumulated_convolutions.data() + kernel_index * 40); + Eigen::Map aliased_downsampled(accumulated_results.data() + output_feature_map_index * 40); aliased_downsampled = downsampled; // Add post-convolution bias - aliased_downsampled.array() += conv_b(kernel_index); // array conversion required to get access to elemwise/scalar operations + aliased_downsampled.array() += conv_b(output_feature_map_index); // array conversion required to get access to elemwise/scalar operations } // Perform post-convolution transform - accumulated_convolutions = accumulated_convolutions.unaryExpr(std::ptr_fun(tanhf)); + accumulated_results = accumulated_results.unaryExpr(std::ptr_fun(tanh)); + + return accumulated_results; +} + + +#if TEST_GENERATED_MODELS + +static uint8_t data_5e947094[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 1 + 0x4E, 0x8A, 0x5A, 0x3F, 0x6A, 0x28, 0x53, 0x3F, 0x50, 0xB9, 0x0B, 0x3E, 0xD7, 0xCD, 0xEC, 0x3E, 0x80, 0x89, 0x77, 0x3F, 0xDF, 0x52, 0x76, 0x3E, + 0xB5, 0xFC, 0x95, 0x3E, 0xED, 0xC1, 0x47, 0x3F, 0x6D, 0x20, 0xB4, 0x3E, 0xBA, 0xB4, 0xFE, 0xBC, 0xD3, 0xD8, 0x25, 0x3F, 0xB9, 0xB9, 0x02, 0x3F, + 0xCD, 0x4B, 0x66, 0x3F, 0x42, 0xDC, 0x0E, 0xBE, 0xFE, 0x83, 0x18, 0x3F, 0x0B, 0x01, 0x71, 0x3F, 0x00, 0x5A, 0x22, 0x3F, 0xB4, 0xFD, 0x9D, 0x3E, + 0xFA, 0x8A, 0x77, 0x3F, 0x8A, 0x3D, 0x66, 0x3F, 0x9E, 0x6F, 0x6C, 0x3F, 0x83, 0xEB, 0x2C, 0x3F, 0xE3, 0x33, 0x53, 0x3F, 0xD7, 0x97, 0x79, 0x3F, + 0xC8, 0x92, 0xF8, 0xBB, 0x52, 0x8F, 0x22, 0x3F, 0xD5, 0x9A, 0x2F, 0x3F, 0x0E, 0x78, 0xA6, 0x3E, 0x62, 0x42, 0xC3, 0x3E, 0x7A, 0x9F, 0x77, 0x3F, + 0x22, 0xE3, 0x53, 0x3F, 0xC0, 0x23, 0x4D, 0x3F, 0x06, 0x2F, 0xD5, 0x3E, 0xC3, 0x7C, 0x19, 0x3F, 0x78, 0xB5, 0x67,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 0x94, 0x3E, 0x57, 0x9C, 0x5C, 0xBE, 0x3C, 0x24, 0x0A, 0x3F, + 0x35, 0x55, 0xCC, 0xBE, 0x43, 0x0B, 0x99, 0x3E, 0x0F, 0x25, 0x19, 0xBE, 0xDD, 0x7B, 0xB1, 0x3D, 0xFD, 0x2C, 0x18, 0xBF, 0xE7, 0xCF, 0x25, 0x3E, + 0xCA, 0x7C, 0x92, 0xBD, 0xF7, 0x53, 0xB0, 0xBD, 0x9A, 0xFF, 0x81, 0xBE, 0x30, 0x22, 0x03, 0x3F, 0xE2, 0xBC, 0xC8, 0x3E, 0xC9, 0xF4, 0xFC, 0x3E, + 0xF5, 0x8A, 0xA8, 0x3E, 0x5E, 0x11, 0x45, 0x3F, +}; // data_5e947094 (test output layer 1) + +static uint8_t data_80ccde6d[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 2 + 0xC1, 0xBA, 0x7A, 0x3F, 0x7D, 0x91, 0xED, 0xBE, 0x96, 0x30, 0x55, 0xBF, 0x17, 0xDB, 0x7F, 0x3F, 0xFE, 0xF5, 0x5E, 0x3F, 0x19, 0x73, 0x61, 0xBF, + 0x67, 0x0B, 0x69, 0xBF, 0xE9, 0xC1, 0xD4, 0xBE, 0xB9, 0x1D, 0xB2, 0x3E, 0x90, 0x39, 0x7E, 0x3F, 0x66, 0xCE, 0x7F, 0x3F, 0x45, 0xCC, 0x74, 0xBF, + 0x64, 0x1C, 0x7D, 0x3F, 0xFD, 0xC0, 0x3D, 0xBF, 0x9C, 0x74, 0x46, 0xBF, 0x66, 0x2C, 0x42, 0x3F, 0xBE, 0xFE, 0x7F, 0x3F, 0xEE, 0x98, 0x73, 0xBF, + 0x70, 0x95, 0x1D, 0x3F, 0xFC, 0xD1, 0x7E, 0x3F, 0x2B, 0xD0, 0x08, 0xBF, 0x2F, 0x69, 0x7C, 0x3F, 0xA6, 0x24, 0x6E, 0x3F, 0x15, 0xA2, 0x09, 0x3F, + 0x68, 0x24, 0x7F, 0xBF, 0x78, 0x70, 0x77, 0xBF, 0x35, 0x33, 0x6E, 0xBF, 0xC5, 0xB8, 0x66, 0xBF, 0x9F, 0x9C, 0x41, 0x3F, 0x9D, 0x28, 0x7B, 0xBF, + 0x93, 0xE3, 0x1E, 0xBF, 0xD8, 0x00, 0x6E, 0xBF, +}; // data_80ccde6d (test output layer 2) + + +#define COMPARE01266c1b(LAYER, MATRIX1, MATRIX2) \ + if((((MATRIX1).array() - (MATRIX2).array()).abs() > 1e-5f).any()) { \ + std::cerr << "*** Conv model 01266c1b TEST FAILURE AT LAYER " << LAYER << " ***\n"; \ + std::cerr << "Got:\n" << (MATRIX1) << "\nExpected:\n" << (MATRIX2) << "\n"; \ + std::cerr << "Diff:\n" << (MATRIX1) - (MATRIX2) << "\n"; \ + return ModelCOutput_01266c1b::Zero(); \ + } \ + else { \ + std::cerr << "Conv model 01266c1b LAYER " << LAYER << " successful.\n"; \ + } +#endif + +DMZ_INTERNAL ModelCOutput_01266c1b applyc_01266c1b(const ModelCInput_01266c1b& input, bool test_generated_models) { + + ModelCInput_01266c1b normalized_input = input; + + // Apply convolutional layer(s) + Eigen::Map mapped_input((float *)normalized_input.data()); + ModelCConvResult_01266c1b_1 convolution_result_1 = convolve_01266c1b_1(mapped_input); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_1((float *)data_5e947094); + COMPARE01266c1b(1, convolution_result_1, known_good_output_1) + } +#endif // Apply hidden layer Eigen::Map hidden_W((float *)data_cdc19833); Eigen::Map hidden_b((float *)data_e6740ec9); - ModelCHiddenResult_01266c1b hidden_result = hidden_W * accumulated_convolutions + hidden_b; - hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanhf)); + Eigen::Map< Eigen::Matrix > mapped_conv_result(convolution_result_1.data()); + ModelCHiddenResult_01266c1b hidden_result = hidden_W * mapped_conv_result + hidden_b; + hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanh)); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_hidden((float *)data_80ccde6d); + COMPARE01266c1b("Hidden", hidden_result, known_good_output_hidden) + } +#endif // Apply logistic layer Eigen::Map logistic_W((float *)data_1028bdda); @@ -1941,105 +2070,110 @@ DMZ_INTERNAL ModelCOutput_01266c1b applyc_01266c1b(const ModelCInput_01266c1b& i #include -static uint8_t data_31c0cc47_01266c1b[2052] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input - 0x46, 0x41, 0xAE, 0x3C, 0x45, 0x9D, 0x58, 0x3F, 0x23, 0x19, 0x59, 0x3F, 0x1D, 0x19, 0xD6, 0x3E, 0xDB, 0x2C, 0xC9, 0x3E, 0xA3, 0x68, 0x48, 0x3D, - 0x40, 0xFF, 0xDB, 0x3E, 0x1A, 0x75, 0x62, 0x3F, 0xA5, 0xCD, 0x78, 0x3F, 0x4E, 0xDE, 0x1F, 0x3F, 0xC9, 0x10, 0xD2, 0x3E, 0x3A, 0x62, 0xC6, 0x3E, - 0x59, 0xC1, 0x6B, 0x3E, 0x56, 0xE0, 0x37, 0x3F, 0x84, 0x91, 0x50, 0x3F, 0x93, 0x45, 0x85, 0x3C, 0xB8, 0x75, 0x34, 0x3F, 0xC4, 0xFF, 0x2C, 0x3F, - 0x1B, 0xCC, 0xF9, 0x3E, 0x4A, 0xB5, 0x69, 0x3E, 0x47, 0x53, 0xFB, 0x3D, 0x12, 0xB9, 0xE8, 0x3E, 0xEB, 0x9E, 0x55, 0x3F, 0xAC, 0x23, 0x79, 0x3E, - 0x37, 0xC8, 0x57, 0x3F, 0xB5, 0xF6, 0x0E, 0x3F, 0x9A, 0xF8, 0x8B, 0x3E, 0x7F, 0xBC, 0x2A, 0x3F, 0x2D, 0x05, 0x61, 0x3F, 0x75, 0xC0, 0x5F, 0x3F, - 0xD6, 0xF9, 0x6C, 0x3E, 0x76, 0x60, 0x21, 0x3F, 0x1E, 0x60, 0x98, 0x3D, 0xC7, 0x64, 0x7C, 0x3D, 0x8F, 0xB6, 0xC4, 0x3E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0x3E, 0x05, 0x19, 0x42, 0x3E, 0x0A, 0xC3, 0xAD, 0x3E, 0xE8, 0x6A, 0x2C, 0x3E, 0x2F, 0xD8, 0xE0, 0x3E, - 0xC5, 0x9A, 0xF1, 0x3D, 0x15, 0x45, 0x1F, 0x3F, 0x04, 0x67, 0x8E, 0x3E, 0x10, 0xD2, 0x30, 0x3D, 0x90, 0x8D, 0x34, 0x3F, 0xBC, 0x9B, 0x89, 0x3E, - 0x42, 0x2E, 0x49, 0x3D, 0x85, 0x43, 0x4E, 0x3F, 0x7B, 0xA0, 0x7B, 0x3F, 0xEB, 0xEF, 0x4A, 0x3F, 0x03, 0xC8, 0x1C, 0x3F, 0x50, 0xB8, 0x90, 0x3E, - 0x24, 0x4D, 0x82, 0x3E, 0xF5, 0x69, 0x22, 0x3F, 0x05, 0xBA, 0x59, 0x3F, 0xE0, 0x08, 0xA6, 0x3E, 0xE7, 0x63, 0x58, 0x3E, 0x30, 0xA4, 0x21, 0x3F, - 0xC4, 0x61, 0x86, 0x3E, 0x03, 0x6A, 0x7A, 0x3F, 0x70, 0xA1, 0x01, 0x3F, 0xE1, 0x0A, 0x0B, 0x3D, 0x08, 0xC0, 0x6F, 0x3F, 0x28, 0x0A, 0x1D, 0x3F, - 0x74, 0x75, 0x63, 0x3F, 0xAD, 0x86, 0x91, 0x3E, 0xEB, 0xB3, 0x1E, 0x3F, -}; // data_31c0cc47_01266c1b (test input) - -static uint8_t data_8ead34f8[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output - 0x62, 0xCE, 0x2F, 0x34, 0x27, 0xE0, 0x1A, 0x3B, 0xA7, 0x4D, 0xE3, 0x35, 0xF9, 0x2F, 0x86, 0x35, 0x63, 0x45, 0x6D, 0x3F, 0x89, 0xCB, 0xB9, 0x32, - 0xF8, 0x1F, 0xDD, 0x39, 0x82, 0xC9, 0x9E, 0x36, 0x03, 0xF9, 0x81, 0x39, 0xCF, 0x9A, 0x8F, 0x3D, -}; // data_8ead34f8 (test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4D, 0xB2, 0x52, 0x3F, 0xDF, 0xB0, 0x8B, 0x3E, 0xAD, 0xFA, 0x0B, 0x3F, + 0x5A, 0x7D, 0x2B, 0x3F, 0xFE, 0x5B, 0x6C, 0x3F, 0xAD, 0x32, 0x5E, 0x3E, 0x6C, 0x06, 0x37, 0x3F, 0xCF, 0x1A, 0x5B, 0x3F, 0xE0, 0xDA, 0x38, 0x3F, + 0x0A, 0x71, 0x71, 0x3F, 0xA3, 0x0A, 0x75, 0x3F, 0xF9, 0x2C, 0x44, 0x3F, 0xB6, 0x4E, 0x6E, 0x3F, 0xBA, 0xE8, 0x2F, 0x3C, 0xC9, 0x02, 0x47, 0x3E, + 0x77, 0x01, 0x88, 0x3E, 0xB4, 0x95, 0x33, 0x3E, 0xCF, 0x84, 0x5C, 0x3F, 0x6F, 0xD7, 0x11, 0x3F, 0xC3, 0x61, 0x28, 0x3F, 0x4A, 0x67, 0x0C, 0x3F, + 0xAD, 0x6A, 0xF8, 0x3C, 0x24, 0xEA, 0xC6, 0x3D, 0xE1, 0x95, 0x9E, 0x3E, +}; // data_1ab1428f_01266c1b (test input) + +static uint8_t data_68650034[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output + 0x31, 0x84, 0xBE, 0x2F, 0x29, 0xEF, 0x14, 0x3D, 0xE1, 0xC7, 0x18, 0x2D, 0xA3, 0x21, 0x1A, 0x32, 0xE2, 0xAF, 0x76, 0x3F, 0x8D, 0x97, 0xE7, 0x2E, + 0x7F, 0x83, 0x8F, 0x37, 0x91, 0x4F, 0xB3, 0x2F, 0x51, 0x01, 0x39, 0x35, 0xF3, 0xF9, 0x71, 0x32, +}; // data_68650034 (test output) bool passc_01266c1b() { - Eigen::Map test_input((float *)data_31c0cc47_01266c1b); - ModelCOutput_01266c1b computed_output = applyc_01266c1b(test_input); - Eigen::Map known_good_output((float *)data_8ead34f8); + Eigen::Map test_input((float *)data_1ab1428f_01266c1b); + ModelCOutput_01266c1b computed_output = applyc_01266c1b(test_input, true); + + if (computed_output.array().isZero(1e-3f)) { + return false; + } + + Eigen::Map known_good_output((float *)data_68650034); if(((computed_output.array() - known_good_output.array()).abs() > 1e-5f).any()) { // TODO: Return more useful info here, rather than printing to stderr... diff --git a/models/generated/modelc_01266c1b.hpp b/models/generated/modelc_01266c1b.hpp index fe21b3d..5fd4d06 100644 --- a/models/generated/modelc_01266c1b.hpp +++ b/models/generated/modelc_01266c1b.hpp @@ -2,7 +2,7 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10b_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers0.model.pkl // @@ -15,7 +15,7 @@ typedef Eigen::Matrix ModelCInput_01266c1b; typedef Eigen::Matrix ModelCOutput_01266c1b; -DMZ_INTERNAL ModelCOutput_01266c1b applyc_01266c1b(const ModelCInput_01266c1b& input); +DMZ_INTERNAL ModelCOutput_01266c1b applyc_01266c1b(const ModelCInput_01266c1b& input, bool test_generated_models = false); #if TEST_GENERATED_MODELS diff --git a/models/generated/modelc_5c241121.cpp b/models/generated/modelc_5c241121.cpp index b577596..9940917 100644 --- a/models/generated/modelc_5c241121.cpp +++ b/models/generated/modelc_5c241121.cpp @@ -2,23 +2,25 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10e2_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers1.model.pkl // #include "compile.h" #if COMPILE_DMZ -#define EIGEN_NO_DEBUG 1 // turn off range checking and anything else that could slow us down! -#define USE_OPTIMIZED_3x3_CONVOLUTION 1 +#define USE_OPTIMIZED_3x3_CONVOLUTION_5c241121 1 #include "modelc_5c241121.hpp" -#if USE_OPTIMIZED_3x3_CONVOLUTION - #include "cv/conv.h" +#if USE_OPTIMIZED_3x3_CONVOLUTION_5c241121 + #include "conv.h" #include "processor_support.h" #endif + +// Conv layer 1 of 1 + static uint8_t data_183da1fa[288] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv W 0x54, 0x6D, 0x80, 0xBF, 0xE2, 0x94, 0xF5, 0xBF, 0x18, 0x60, 0x96, 0xBF, 0x7A, 0x00, 0xCB, 0xBE, 0x11, 0x80, 0x46, 0x3F, 0x56, 0x7B, 0xCF, 0xBE, 0xDA, 0x3D, 0x65, 0x3F, 0x12, 0x4D, 0x05, 0x40, 0xFD, 0xFE, 0xC8, 0x3F, 0x5C, 0xEB, 0xC4, 0xBF, 0x17, 0x11, 0x59, 0x40, 0x47, 0xF2, 0xDA, 0xBF, @@ -39,6 +41,22 @@ static uint8_t data_856b8dc6[32] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv b 0x51, 0xD9, 0x2D, 0xC0, 0x2F, 0xAE, 0x9D, 0xBF, }; // data_856b8dc6 (conv b) +typedef Eigen::Matrix ModelCConvInputFeatureMap_5c241121_1; +typedef Eigen::Matrix ModelCConvInput_5c241121_1; + +typedef Eigen::Matrix ModelCAllKernels_5c241121_1; +typedef Eigen::Matrix ModelCAllKernelsForOutputFeatureMap_5c241121_1; +typedef Eigen::Matrix ModelCSingleKernel_5c241121_1; +typedef Eigen::Matrix ModelCConvB_5c241121_1; +typedef Eigen::Matrix ModelCSingleConvolved_5c241121_1; +typedef Eigen::Matrix ModelCSingleDownsampled_5c241121_1; +#if USE_OPTIMIZED_3x3_CONVOLUTION_5c241121 + typedef Eigen::Matrix ModelCSingleKernelPadded_5c241121_1; +#endif + +typedef Eigen::Matrix ModelCConvResult_5c241121_1; + + static uint8_t data_c9993328[40960] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden W 0xF1, 0x77, 0xA3, 0x3D, 0xA0, 0xF7, 0x1D, 0xBE, 0xBD, 0x5C, 0x94, 0x3E, 0xF0, 0x9B, 0xA9, 0x3E, 0xDB, 0xF0, 0x24, 0xBE, 0xD0, 0x3E, 0xAF, 0x3D, 0x5F, 0x7D, 0x8D, 0xBC, 0x07, 0xF5, 0xBB, 0xBD, 0xBD, 0x97, 0xDB, 0x3C, 0x00, 0xD3, 0x8A, 0xBD, 0xF7, 0x77, 0x9A, 0x3E, 0xCA, 0x2C, 0xD2, 0xBE, @@ -1758,6 +1776,7 @@ static uint8_t data_4cdf1eda[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden b 0x14, 0xC9, 0xA5, 0xBF, 0x9E, 0xA8, 0x8F, 0x3E, }; // data_4cdf1eda (hidden b) + static uint8_t data_a78d46f0[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic W 0x34, 0x9A, 0xAD, 0x3F, 0xD5, 0x27, 0x0F, 0xC0, 0xA8, 0x20, 0x13, 0x3E, 0x41, 0x47, 0x9A, 0x3F, 0x85, 0xAB, 0x81, 0xBF, 0x18, 0x5F, 0xF5, 0xBF, 0x40, 0x1E, 0xC9, 0xBF, 0x91, 0x84, 0xA6, 0xBC, 0x5B, 0xA5, 0xB4, 0x3F, 0x9C, 0x3C, 0x2B, 0x40, 0xBB, 0xDB, 0x92, 0x3F, 0xCC, 0x9B, 0xA1, 0xBF, @@ -1821,14 +1840,6 @@ static uint8_t data_9ba829af[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic b }; // data_9ba829af (logistic b) -typedef Eigen::Matrix ModelCAllKernels_5c241121; -typedef Eigen::Matrix ModelCSingleKernel_5c241121; -typedef Eigen::Matrix ModelCConvB_5c241121; - -typedef Eigen::Matrix ModelCSingleConvolved_5c241121; -typedef Eigen::Matrix ModelCSingleDownsampled_5c241121; -typedef Eigen::Matrix ModelCConvResult_5c241121; - typedef Eigen::Matrix ModelCHiddenW_5c241121; typedef Eigen::Matrix ModelCHiddenB_5c241121; typedef Eigen::Matrix ModelCHiddenResult_5c241121; @@ -1836,20 +1847,21 @@ typedef Eigen::Matrix ModelCHiddenResult_5c241121 typedef Eigen::Matrix ModelCLogisticW_5c241121; typedef Eigen::Matrix ModelCLogisticB_5c241121; -#if USE_OPTIMIZED_3x3_CONVOLUTION - typedef Eigen::Matrix ModelCSingleKernelPadded_5c241121; -#endif +DMZ_INTERNAL float rectified_linear_unit_activation_5c241121(float value) { + return MAX(value, 0.0f); +} -DMZ_INTERNAL ModelCSingleConvolved_5c241121 convc_5c241121(const ModelCInput_5c241121& input, const ModelCSingleKernel_5c241121& kernel) { - ModelCSingleConvolved_5c241121 output; +DMZ_INTERNAL ModelCSingleConvolved_5c241121_1 convc_5c241121_1(const ModelCConvInputFeatureMap_5c241121_1& input, + const ModelCSingleKernel_5c241121_1& kernel) { + ModelCSingleConvolved_5c241121_1 output; -#if USE_OPTIMIZED_3x3_CONVOLUTION - ModelCSingleKernelPadded_5c241121 padded_kernel; +#if USE_OPTIMIZED_3x3_CONVOLUTION_5c241121 + ModelCSingleKernelPadded_5c241121_1 padded_kernel; bool has_neon = dmz_has_neon_runtime(); if(has_neon) { - padded_kernel = ModelCSingleKernelPadded_5c241121::Zero(); + padded_kernel = ModelCSingleKernelPadded_5c241121_1::Zero(); padded_kernel.block<3, 3>(0, 0) = kernel; } #endif @@ -1857,7 +1869,7 @@ DMZ_INTERNAL ModelCSingleConvolved_5c241121 convc_5c241121(const ModelCInput_5c2 for(uint16_t output_row = 0; output_row < 24; output_row++) { uint16_t vector_processed_cols = 0; -#if USE_OPTIMIZED_3x3_CONVOLUTION +#if USE_OPTIMIZED_3x3_CONVOLUTION_5c241121 if(has_neon) { llcv_conv_3x3_f32_row(input.row(output_row).data(), input.row(output_row + 1).data(), @@ -1871,17 +1883,15 @@ DMZ_INTERNAL ModelCSingleConvolved_5c241121 convc_5c241121(const ModelCInput_5c2 // Scalar handling of non-vectorized leftovers for(uint16_t output_col = vector_processed_cols; output_col < 15; output_col++) { - ModelCSingleKernel_5c241121 input_submatrix = input.block<3, 3>(output_row, output_col); - ModelCSingleKernel_5c241121 elemwise_mult = kernel.cwiseProduct(input_submatrix); - float sum = elemwise_mult.sum(); - output(output_row, output_col) = sum; + ModelCSingleKernel_5c241121_1 input_submatrix = input.block<3, 3>(output_row, output_col); + output(output_row, output_col) = kernel.cwiseProduct(input_submatrix).sum(); } } return output; } -DMZ_INTERNAL ModelCSingleDownsampled_5c241121 downc_5c241121(const ModelCSingleConvolved_5c241121& input) { - ModelCSingleDownsampled_5c241121 output; +DMZ_INTERNAL ModelCSingleDownsampled_5c241121_1 downc_5c241121_1(const ModelCSingleConvolved_5c241121_1& input) { + ModelCSingleDownsampled_5c241121_1 output; for(uint16_t output_row = 0; output_row < 8; output_row++) { for(uint16_t output_col = 0; output_col < 5; output_col++) { output(output_row, output_col) = input.block<3, 3>(output_row * 3, output_col * 3).maxCoeff(); @@ -1890,37 +1900,156 @@ DMZ_INTERNAL ModelCSingleDownsampled_5c241121 downc_5c241121(const ModelCSingleC return output; } -DMZ_INTERNAL ModelCOutput_5c241121 applyc_5c241121(const ModelCInput_5c241121& input) { - ModelCConvResult_5c241121 accumulated_convolutions; +DMZ_INTERNAL ModelCConvResult_5c241121_1 convolve_5c241121_1(const ModelCConvInput_5c241121_1& input) { + ModelCConvResult_5c241121_1 accumulated_results; + + Eigen::Map all_kernels((float *)data_183da1fa); + Eigen::Map conv_b((float *)data_856b8dc6); - Eigen::Map all_kernels((float *)data_183da1fa); - Eigen::Map conv_b((float *)data_856b8dc6); + for(uint8_t output_feature_map_index = 0; output_feature_map_index < 8; output_feature_map_index++) { + Eigen::Map kernels(all_kernels.data() + output_feature_map_index * 9); - // TODO: Simultaneous multi-kernel calculations? - for(uint8_t kernel_index = 0; kernel_index < 8; kernel_index++) { - Eigen::Map kernel(all_kernels.data() + kernel_index * 9); + ModelCSingleConvolved_5c241121_1 accumulated_convolutions_for_kernel = ModelCSingleConvolved_5c241121_1::Zero(); - // Convolve, downsample - ModelCSingleConvolved_5c241121 convolved = convc_5c241121(input, kernel); - ModelCSingleDownsampled_5c241121 downsampled = downc_5c241121(convolved); + // Convolve + for (uint8_t input_feature_map_index = 0; input_feature_map_index < 1; input_feature_map_index++) { + Eigen::Map kernel(kernels.data() + input_feature_map_index * 9); + ModelCConvInputFeatureMap_5c241121_1 aliased_input_feature_map(input.data() + input_feature_map_index * 513); + ModelCSingleConvolved_5c241121_1 convolved = convc_5c241121_1(aliased_input_feature_map, kernel); + accumulated_convolutions_for_kernel += convolved; + } + + //if (output_feature_map_index == 0) { + // std::cerr << "_5c241121_1 Kernel " << (int)output_feature_map_index << ":\n" << kernels << "\n"; + // std::cerr << "_5c241121_1 Convolved " << (int)output_feature_map_index << ":\n" << accumulated_convolutions_for_kernel << "\n"; + //} + + // Downsample + ModelCSingleDownsampled_5c241121_1 downsampled = downc_5c241121_1(accumulated_convolutions_for_kernel); // Copy into place in our output buffer (via aliasing) - Eigen::Map aliased_downsampled(accumulated_convolutions.data() + kernel_index * 40); + Eigen::Map aliased_downsampled(accumulated_results.data() + output_feature_map_index * 40); aliased_downsampled = downsampled; // Add post-convolution bias - aliased_downsampled.array() += conv_b(kernel_index); // array conversion required to get access to elemwise/scalar operations + aliased_downsampled.array() += conv_b(output_feature_map_index); // array conversion required to get access to elemwise/scalar operations } // Perform post-convolution transform - accumulated_convolutions = accumulated_convolutions.unaryExpr(std::ptr_fun(tanhf)); + accumulated_results = accumulated_results.unaryExpr(std::ptr_fun(tanh)); + + return accumulated_results; +} + + +#if TEST_GENERATED_MODELS + +static uint8_t data_66b570fa[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 1 + 0xED, 0x02, 0x5B, 0xBE, 0x98, 0xA8, 0x3C, 0xBF, 0xB7, 0x32, 0x45, 0xBF, 0xCE, 0x85, 0x3D, 0xBF, 0x00, 0xBC, 0x4C, 0xBF, 0xEA, 0x5D, 0xBB, 0xBE, + 0x0E, 0x8A, 0xD9, 0x3E, 0x58, 0x59, 0x78, 0x3E, 0x01, 0x98, 0x33, 0xBD, 0x87, 0x93, 0x21, 0x3E, 0x76, 0x0D, 0xDC, 0x3E, 0x17, 0x1A, 0x3A, 0xBF, + 0x36, 0xB1, 0x07, 0x3F, 0xF1, 0xB7, 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0x25, 0x7A, 0x2D, 0x3F, 0xE8, 0xC4, 0x7F, 0x3E, 0x52, 0x78, 0x64, 0xBE, 0x45, 0x34, 0x36, 0x3F, 0x56, 0x66, 0xF1, 0xBE, 0x29, 0x4C, 0x5B, 0x3F, + 0x5C, 0xDF, 0x52, 0x3F, 0xF8, 0x6B, 0x0E, 0x3F, 0x3D, 0x76, 0x29, 0x3F, 0xB4, 0xD1, 0x60, 0x3F, 0xEB, 0xD7, 0xFE, 0x3E, 0x14, 0x5F, 0xBD, 0x3E, + 0x40, 0x95, 0x25, 0x3F, 0x4A, 0x30, 0x11, 0x3F, 0x54, 0x04, 0x57, 0x3E, 0x4B, 0x0D, 0x66, 0xBE, 0xF1, 0x31, 0x38, 0x3F, 0xCD, 0xD0, 0x46, 0x3F, + 0x07, 0xD9, 0x16, 0x3F, 0xA9, 0xFD, 0xC6, 0x3E, 0x53, 0xB6, 0xD8, 0xBE, 0x4E, 0x22, 0x64, 0x3F, 0xE2, 0x8E, 0x04, 0x3F, 0x03, 0xE8, 0xCD, 0xBE, + 0x37, 0xC7, 0xA0, 0x3E, 0xDB, 0x08, 0x4A, 0x3E, 0xC1, 0xCE, 0x70, 0x3F, 0x86, 0x38, 0xE3, 0xBE, 0xBF, 0x97, 0x5C, 0x3F, 0x82, 0xFF, 0x84, 0xBC, + 0x77, 0x61, 0x74, 0xBE, 0x2B, 0x20, 0x93, 0xBE, 0x21, 0x8E, 0x00, 0x3F, 0x01, 0x64, 0x10, 0x3F, 0x98, 0xBF, 0x79, 0x3F, 0x14, 0x10, 0xEA, 0xBE, + 0x64, 0xE5, 0x66, 0x3E, 0xD6, 0x25, 0x5E, 0x3F, +}; // data_66b570fa (test output layer 1) + +static uint8_t data_5666a0db[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 2 + 0xB0, 0x85, 0xA2, 0x3E, 0x74, 0x59, 0x02, 0x3F, 0x85, 0x2B, 0x75, 0x3F, 0x24, 0x1C, 0xF5, 0x3D, 0xD5, 0x7C, 0x05, 0xBF, 0x80, 0xFF, 0x7F, 0xBF, + 0x7A, 0x32, 0x43, 0x3F, 0x84, 0x92, 0x5F, 0x3F, 0xCE, 0x58, 0x7F, 0xBF, 0x29, 0xA7, 0xF0, 0x3E, 0xAC, 0xFC, 0x7F, 0xBF, 0x4E, 0xCA, 0x75, 0x3F, + 0xCA, 0xD7, 0xC5, 0x3E, 0x85, 0x55, 0x60, 0xBF, 0x3E, 0x24, 0xBE, 0x3E, 0x97, 0x40, 0x7C, 0x3F, 0x4C, 0x13, 0x39, 0x3F, 0xCB, 0x67, 0x4E, 0x3F, + 0x49, 0x94, 0x68, 0xBF, 0xF8, 0x63, 0x7D, 0x3F, 0xD6, 0x8D, 0x6A, 0xBF, 0xC3, 0x21, 0xF0, 0xBE, 0xA6, 0x3A, 0x60, 0xBF, 0xA9, 0xD7, 0x7C, 0xBD, + 0xD3, 0x95, 0x7E, 0xBF, 0xBB, 0xFA, 0x94, 0x3D, 0x91, 0x0E, 0x58, 0x3F, 0x96, 0x1E, 0x4A, 0xBF, 0x41, 0xE1, 0x7D, 0xBF, 0xD6, 0x34, 0x6B, 0x3F, + 0x72, 0x11, 0x73, 0x3F, 0x02, 0x0D, 0x7B, 0x3F, +}; // data_5666a0db (test output layer 2) + + +#define COMPARE5c241121(LAYER, MATRIX1, MATRIX2) \ + if((((MATRIX1).array() - (MATRIX2).array()).abs() > 1e-5f).any()) { \ + std::cerr << "*** Conv model 5c241121 TEST FAILURE AT LAYER " << LAYER << " ***\n"; \ + std::cerr << "Got:\n" << (MATRIX1) << "\nExpected:\n" << (MATRIX2) << "\n"; \ + std::cerr << "Diff:\n" << (MATRIX1) - (MATRIX2) << "\n"; \ + return ModelCOutput_5c241121::Zero(); \ + } \ + else { \ + std::cerr << "Conv model 5c241121 LAYER " << LAYER << " successful.\n"; \ + } +#endif + +DMZ_INTERNAL ModelCOutput_5c241121 applyc_5c241121(const ModelCInput_5c241121& input, bool test_generated_models) { + + ModelCInput_5c241121 normalized_input = input; + + // Apply convolutional layer(s) + Eigen::Map mapped_input((float *)normalized_input.data()); + ModelCConvResult_5c241121_1 convolution_result_1 = convolve_5c241121_1(mapped_input); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_1((float *)data_66b570fa); + COMPARE5c241121(1, convolution_result_1, known_good_output_1) + } +#endif // Apply hidden layer Eigen::Map hidden_W((float *)data_c9993328); Eigen::Map hidden_b((float *)data_4cdf1eda); - ModelCHiddenResult_5c241121 hidden_result = hidden_W * accumulated_convolutions + hidden_b; - hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanhf)); + Eigen::Map< Eigen::Matrix > mapped_conv_result(convolution_result_1.data()); + ModelCHiddenResult_5c241121 hidden_result = hidden_W * mapped_conv_result + hidden_b; + hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanh)); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_hidden((float *)data_5666a0db); + COMPARE5c241121("Hidden", hidden_result, known_good_output_hidden) + } +#endif // Apply logistic layer Eigen::Map logistic_W((float *)data_a78d46f0); @@ -1941,105 +2070,110 @@ DMZ_INTERNAL ModelCOutput_5c241121 applyc_5c241121(const ModelCInput_5c241121& i #include -static uint8_t data_31c0cc47_5c241121[2052] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input - 0x46, 0x41, 0xAE, 0x3C, 0x45, 0x9D, 0x58, 0x3F, 0x23, 0x19, 0x59, 0x3F, 0x1D, 0x19, 0xD6, 0x3E, 0xDB, 0x2C, 0xC9, 0x3E, 0xA3, 0x68, 0x48, 0x3D, - 0x40, 0xFF, 0xDB, 0x3E, 0x1A, 0x75, 0x62, 0x3F, 0xA5, 0xCD, 0x78, 0x3F, 0x4E, 0xDE, 0x1F, 0x3F, 0xC9, 0x10, 0xD2, 0x3E, 0x3A, 0x62, 0xC6, 0x3E, - 0x59, 0xC1, 0x6B, 0x3E, 0x56, 0xE0, 0x37, 0x3F, 0x84, 0x91, 0x50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0xA1, 0x01, 0x3F, 0xE1, 0x0A, 0x0B, 0x3D, 0x08, 0xC0, 0x6F, 0x3F, 0x28, 0x0A, 0x1D, 0x3F, - 0x74, 0x75, 0x63, 0x3F, 0xAD, 0x86, 0x91, 0x3E, 0xEB, 0xB3, 0x1E, 0x3F, -}; // data_31c0cc47_5c241121 (test input) - -static uint8_t data_c2bdeb12[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output - 0xA1, 0xD7, 0xA5, 0x35, 0xBB, 0x25, 0xD5, 0x39, 0x98, 0x07, 0x04, 0x38, 0x21, 0x6B, 0x31, 0x33, 0x1F, 0xE5, 0x7A, 0x3F, 0xA9, 0x5A, 0x2E, 0x2C, - 0x85, 0x9A, 0x14, 0x38, 0x50, 0xC7, 0x85, 0x36, 0x76, 0x0A, 0x52, 0x3A, 0xD7, 0xDF, 0x98, 0x3C, -}; // data_c2bdeb12 (test output) +static uint8_t data_b5b6d66b_5c241121[2052] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input + 0x94, 0x73, 0x11, 0x3F, 0xB2, 0xE4, 0xA0, 0x3E, 0x35, 0xE9, 0x87, 0x3E, 0x1E, 0x10, 0xD5, 0x3E, 0x2A, 0x6F, 0x53, 0x3F, 0x1A, 0x9C, 0x25, 0x3F, + 0x0B, 0x3E, 0x93, 0x3E, 0xB4, 0xF1, 0x66, 0x3F, 0x81, 0xEC, 0x11, 0x3D, 0xDA, 0x35, 0x48, 0x3F, 0xBA, 0x3E, 0x65, 0x3F, 0x01, 0xEA, 0xAF, 0x3E, + 0x90, 0x5B, 0x43, 0x3F, 0x48, 0x88, 0x61, 0x3F, 0x1B, 0x39, 0x32, 0x3F, 0x68, 0x59, 0x04, 0x3F, 0x9F, 0x0D, 0x65, 0x3F, 0xF6, 0x06, 0xB1, 0x3E, + 0x28, 0x59, 0x1E, 0x3F, 0xFD, 0x91, 0x80, 0x3E, 0xB6, 0xB4, 0x76, 0x3F, 0x53, 0x75, 0x45, 0x3F, 0x4B,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B, 0x0C, 0x3F, +}; // data_b5b6d66b_5c241121 (test input) + +static uint8_t data_3c00c9e8[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output + 0xF1, 0xCB, 0x88, 0x3B, 0x3C, 0x93, 0x35, 0x3C, 0x47, 0xCE, 0x0C, 0x38, 0x85, 0xDF, 0x63, 0x3B, 0xCC, 0x30, 0x7B, 0x3F, 0xA6, 0x9E, 0x2B, 0x2A, + 0x34, 0xEC, 0x40, 0x37, 0x0E, 0x9D, 0x29, 0x34, 0x47, 0x64, 0x73, 0x36, 0x7B, 0x15, 0x6E, 0x36, +}; // data_3c00c9e8 (test output) bool passc_5c241121() { - Eigen::Map test_input((float *)data_31c0cc47_5c241121); - ModelCOutput_5c241121 computed_output = applyc_5c241121(test_input); - Eigen::Map known_good_output((float *)data_c2bdeb12); + Eigen::Map test_input((float *)data_b5b6d66b_5c241121); + ModelCOutput_5c241121 computed_output = applyc_5c241121(test_input, true); + + if (computed_output.array().isZero(1e-3f)) { + return false; + } + + Eigen::Map known_good_output((float *)data_3c00c9e8); if(((computed_output.array() - known_good_output.array()).abs() > 1e-5f).any()) { // TODO: Return more useful info here, rather than printing to stderr... diff --git a/models/generated/modelc_5c241121.hpp b/models/generated/modelc_5c241121.hpp index 0e127d1..f1c8179 100644 --- a/models/generated/modelc_5c241121.hpp +++ b/models/generated/modelc_5c241121.hpp @@ -2,7 +2,7 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10e2_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers1.model.pkl // @@ -15,7 +15,7 @@ typedef Eigen::Matrix ModelCInput_5c241121; typedef Eigen::Matrix ModelCOutput_5c241121; -DMZ_INTERNAL ModelCOutput_5c241121 applyc_5c241121(const ModelCInput_5c241121& input); +DMZ_INTERNAL ModelCOutput_5c241121 applyc_5c241121(const ModelCInput_5c241121& input, bool test_generated_models = false); #if TEST_GENERATED_MODELS diff --git a/models/generated/modelc_b00bf70c.cpp b/models/generated/modelc_b00bf70c.cpp index 72f3248..920682f 100644 --- a/models/generated/modelc_b00bf70c.cpp +++ b/models/generated/modelc_b00bf70c.cpp @@ -2,23 +2,25 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10f_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers2.model.pkl // #include "compile.h" #if COMPILE_DMZ -#define EIGEN_NO_DEBUG 1 // turn off range checking and anything else that could slow us down! -#define USE_OPTIMIZED_3x3_CONVOLUTION 1 +#define USE_OPTIMIZED_3x3_CONVOLUTION_b00bf70c 1 #include "modelc_b00bf70c.hpp" -#if USE_OPTIMIZED_3x3_CONVOLUTION - #include "cv/conv.h" +#if USE_OPTIMIZED_3x3_CONVOLUTION_b00bf70c + #include "conv.h" #include "processor_support.h" #endif + +// Conv layer 1 of 1 + static uint8_t data_0b9a8510[288] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv W 0x4F, 0xC8, 0x9F, 0x3F, 0xE6, 0x1D, 0xB0, 0xBF, 0x7F, 0xF4, 0x61, 0xBF, 0xA4, 0x62, 0x95, 0x3F, 0x7D, 0x8B, 0x38, 0x40, 0x0D, 0x7C, 0x12, 0xC0, 0x0F, 0x8B, 0x1A, 0xC0, 0xE0, 0xF4, 0x05, 0x40, 0x18, 0x21, 0x1A, 0x3E, 0xFD, 0x20, 0xD2, 0xBF, 0x1E, 0x8D, 0xF6, 0xBF, 0x49, 0xEB, 0xC1, 0xBF, @@ -39,6 +41,22 @@ static uint8_t data_61c13381[32] EIGEN_ALIGN_TO_BOUNDARY(16) = { // conv b 0xD7, 0x97, 0xD5, 0xBF, 0x24, 0x06, 0x11, 0xBF, }; // data_61c13381 (conv b) +typedef Eigen::Matrix ModelCConvInputFeatureMap_b00bf70c_1; +typedef Eigen::Matrix ModelCConvInput_b00bf70c_1; + +typedef Eigen::Matrix ModelCAllKernels_b00bf70c_1; +typedef Eigen::Matrix ModelCAllKernelsForOutputFeatureMap_b00bf70c_1; +typedef Eigen::Matrix ModelCSingleKernel_b00bf70c_1; +typedef Eigen::Matrix ModelCConvB_b00bf70c_1; +typedef Eigen::Matrix ModelCSingleConvolved_b00bf70c_1; +typedef Eigen::Matrix ModelCSingleDownsampled_b00bf70c_1; +#if USE_OPTIMIZED_3x3_CONVOLUTION_b00bf70c + typedef Eigen::Matrix ModelCSingleKernelPadded_b00bf70c_1; +#endif + +typedef Eigen::Matrix ModelCConvResult_b00bf70c_1; + + static uint8_t data_ca6a3f04[40960] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden W 0x6A, 0x60, 0x97, 0x3E, 0x7A, 0x6B, 0xAD, 0x3E, 0x9F, 0x8F, 0xD7, 0xBD, 0x42, 0x44, 0x91, 0xBC, 0x32, 0x39, 0xDD, 0xBD, 0x48, 0xA7, 0xEE, 0x3E, 0xAE, 0x4A, 0x2B, 0x3F, 0x16, 0x24, 0xE9, 0x3E, 0x66, 0x02, 0x2E, 0x3E, 0x92, 0x52, 0x33, 0xBE, 0x58, 0xA7, 0x83, 0x3E, 0x80, 0xBB, 0x09, 0x3D, @@ -1758,6 +1776,7 @@ static uint8_t data_e549e672[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden b 0xE3, 0xFB, 0x4C, 0xBF, 0x06, 0x44, 0x87, 0xBE, }; // data_e549e672 (hidden b) + static uint8_t data_c05fb198[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic W 0x32, 0x78, 0xE0, 0xBF, 0xFC, 0x1B, 0x38, 0x40, 0x65, 0x6E, 0x21, 0xBF, 0xF7, 0x58, 0xA9, 0xBF, 0xDB, 0x54, 0x01, 0xBF, 0xDD, 0xF8, 0x8C, 0x3F, 0xF5, 0xD4, 0x07, 0xC0, 0x11, 0x58, 0x08, 0xC0, 0x98, 0xD2, 0xDF, 0x3F, 0xF8, 0xC1, 0xC1, 0x3F, 0x8D, 0xD8, 0x29, 0xBE, 0x31, 0xDC, 0x58, 0xBF, @@ -1821,14 +1840,6 @@ static uint8_t data_63d62536[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic b }; // data_63d62536 (logistic b) -typedef Eigen::Matrix ModelCAllKernels_b00bf70c; -typedef Eigen::Matrix ModelCSingleKernel_b00bf70c; -typedef Eigen::Matrix ModelCConvB_b00bf70c; - -typedef Eigen::Matrix ModelCSingleConvolved_b00bf70c; -typedef Eigen::Matrix ModelCSingleDownsampled_b00bf70c; -typedef Eigen::Matrix ModelCConvResult_b00bf70c; - typedef Eigen::Matrix ModelCHiddenW_b00bf70c; typedef Eigen::Matrix ModelCHiddenB_b00bf70c; typedef Eigen::Matrix ModelCHiddenResult_b00bf70c; @@ -1836,20 +1847,21 @@ typedef Eigen::Matrix ModelCHiddenResult_b00bf70c typedef Eigen::Matrix ModelCLogisticW_b00bf70c; typedef Eigen::Matrix ModelCLogisticB_b00bf70c; -#if USE_OPTIMIZED_3x3_CONVOLUTION - typedef Eigen::Matrix ModelCSingleKernelPadded_b00bf70c; -#endif +DMZ_INTERNAL float rectified_linear_unit_activation_b00bf70c(float value) { + return MAX(value, 0.0f); +} -DMZ_INTERNAL ModelCSingleConvolved_b00bf70c convc_b00bf70c(const ModelCInput_b00bf70c& input, const ModelCSingleKernel_b00bf70c& kernel) { - ModelCSingleConvolved_b00bf70c output; +DMZ_INTERNAL ModelCSingleConvolved_b00bf70c_1 convc_b00bf70c_1(const ModelCConvInputFeatureMap_b00bf70c_1& input, + const ModelCSingleKernel_b00bf70c_1& kernel) { + ModelCSingleConvolved_b00bf70c_1 output; -#if USE_OPTIMIZED_3x3_CONVOLUTION - ModelCSingleKernelPadded_b00bf70c padded_kernel; +#if USE_OPTIMIZED_3x3_CONVOLUTION_b00bf70c + ModelCSingleKernelPadded_b00bf70c_1 padded_kernel; bool has_neon = dmz_has_neon_runtime(); if(has_neon) { - padded_kernel = ModelCSingleKernelPadded_b00bf70c::Zero(); + padded_kernel = ModelCSingleKernelPadded_b00bf70c_1::Zero(); padded_kernel.block<3, 3>(0, 0) = kernel; } #endif @@ -1857,7 +1869,7 @@ DMZ_INTERNAL ModelCSingleConvolved_b00bf70c convc_b00bf70c(const ModelCInput_b00 for(uint16_t output_row = 0; output_row < 24; output_row++) { uint16_t vector_processed_cols = 0; -#if USE_OPTIMIZED_3x3_CONVOLUTION +#if USE_OPTIMIZED_3x3_CONVOLUTION_b00bf70c if(has_neon) { llcv_conv_3x3_f32_row(input.row(output_row).data(), input.row(output_row + 1).data(), @@ -1871,17 +1883,15 @@ DMZ_INTERNAL ModelCSingleConvolved_b00bf70c convc_b00bf70c(const ModelCInput_b00 // Scalar handling of non-vectorized leftovers for(uint16_t output_col = vector_processed_cols; output_col < 15; output_col++) { - ModelCSingleKernel_b00bf70c input_submatrix = input.block<3, 3>(output_row, output_col); - ModelCSingleKernel_b00bf70c elemwise_mult = kernel.cwiseProduct(input_submatrix); - float sum = elemwise_mult.sum(); - output(output_row, output_col) = sum; + ModelCSingleKernel_b00bf70c_1 input_submatrix = input.block<3, 3>(output_row, output_col); + output(output_row, output_col) = kernel.cwiseProduct(input_submatrix).sum(); } } return output; } -DMZ_INTERNAL ModelCSingleDownsampled_b00bf70c downc_b00bf70c(const ModelCSingleConvolved_b00bf70c& input) { - ModelCSingleDownsampled_b00bf70c output; +DMZ_INTERNAL ModelCSingleDownsampled_b00bf70c_1 downc_b00bf70c_1(const ModelCSingleConvolved_b00bf70c_1& input) { + ModelCSingleDownsampled_b00bf70c_1 output; for(uint16_t output_row = 0; output_row < 8; output_row++) { for(uint16_t output_col = 0; output_col < 5; output_col++) { output(output_row, output_col) = input.block<3, 3>(output_row * 3, output_col * 3).maxCoeff(); @@ -1890,37 +1900,156 @@ DMZ_INTERNAL ModelCSingleDownsampled_b00bf70c downc_b00bf70c(const ModelCSingleC return output; } -DMZ_INTERNAL ModelCOutput_b00bf70c applyc_b00bf70c(const ModelCInput_b00bf70c& input) { - ModelCConvResult_b00bf70c accumulated_convolutions; +DMZ_INTERNAL ModelCConvResult_b00bf70c_1 convolve_b00bf70c_1(const ModelCConvInput_b00bf70c_1& input) { + ModelCConvResult_b00bf70c_1 accumulated_results; + + Eigen::Map all_kernels((float *)data_0b9a8510); + Eigen::Map conv_b((float *)data_61c13381); - Eigen::Map all_kernels((float *)data_0b9a8510); - Eigen::Map conv_b((float *)data_61c13381); + for(uint8_t output_feature_map_index = 0; output_feature_map_index < 8; output_feature_map_index++) { + Eigen::Map kernels(all_kernels.data() + output_feature_map_index * 9); - // TODO: Simultaneous multi-kernel calculations? - for(uint8_t kernel_index = 0; kernel_index < 8; kernel_index++) { - Eigen::Map kernel(all_kernels.data() + kernel_index * 9); + ModelCSingleConvolved_b00bf70c_1 accumulated_convolutions_for_kernel = ModelCSingleConvolved_b00bf70c_1::Zero(); - // Convolve, downsample - ModelCSingleConvolved_b00bf70c convolved = convc_b00bf70c(input, kernel); - ModelCSingleDownsampled_b00bf70c downsampled = downc_b00bf70c(convolved); + // Convolve + for (uint8_t input_feature_map_index = 0; input_feature_map_index < 1; input_feature_map_index++) { + Eigen::Map kernel(kernels.data() + input_feature_map_index * 9); + ModelCConvInputFeatureMap_b00bf70c_1 aliased_input_feature_map(input.data() + input_feature_map_index * 513); + ModelCSingleConvolved_b00bf70c_1 convolved = convc_b00bf70c_1(aliased_input_feature_map, kernel); + accumulated_convolutions_for_kernel += convolved; + } + + //if (output_feature_map_index == 0) { + // std::cerr << "_b00bf70c_1 Kernel " << (int)output_feature_map_index << ":\n" << kernels << "\n"; + // std::cerr << "_b00bf70c_1 Convolved " << (int)output_feature_map_index << ":\n" << accumulated_convolutions_for_kernel << "\n"; + //} + + // Downsample + ModelCSingleDownsampled_b00bf70c_1 downsampled = downc_b00bf70c_1(accumulated_convolutions_for_kernel); // Copy into place in our output buffer (via aliasing) - Eigen::Map aliased_downsampled(accumulated_convolutions.data() + kernel_index * 40); + Eigen::Map aliased_downsampled(accumulated_results.data() + output_feature_map_index * 40); aliased_downsampled = downsampled; // Add post-convolution bias - aliased_downsampled.array() += conv_b(kernel_index); // array conversion required to get access to elemwise/scalar operations + aliased_downsampled.array() += conv_b(output_feature_map_index); // array conversion required to get access to elemwise/scalar operations } // Perform post-convolution transform - accumulated_convolutions = accumulated_convolutions.unaryExpr(std::ptr_fun(tanhf)); + accumulated_results = accumulated_results.unaryExpr(std::ptr_fun(tanh)); + + return accumulated_results; +} + + +#if TEST_GENERATED_MODELS + +static uint8_t data_15b8dc20[1280] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 1 + 0x90, 0xD0, 0x88, 0xBE, 0xB9, 0xE0, 0x18, 0x3F, 0x9A, 0x51, 0x70, 0x3F, 0x5B, 0x18, 0xB9, 0x3E, 0x98, 0xBE, 0x63, 0x3F, 0xD2, 0x29, 0x2D, 0xBE, + 0x3F, 0xAE, 0x29, 0x3E, 0xEF, 0x79, 0x2E, 0x3F, 0x92, 0x70, 0x51, 0xBE, 0x7A, 0x41, 0x29, 0x3F, 0x85, 0x9D, 0x70, 0x3F, 0x55, 0x9D, 0x7C, 0x3F, + 0x1E, 0x6B, 0x77, 0x3F, 0x25, 0x9B, 0x7C, 0x3F, 0xA9, 0x3E, 0x7A, 0x3F, 0xD9, 0xED, 0x67, 0x3F, 0x1B, 0xB9, 0x0B, 0x3F, 0x33, 0x38, 0x78, 0x3F, + 0xF8, 0xB6, 0x11, 0x3F, 0x36, 0xA5, 0x6B, 0x3F, 0x28, 0xF4, 0x38, 0x3F, 0x81, 0xCC, 0x7E, 0x3F, 0xC1, 0xDE, 0x43, 0x3F, 0xB5, 0x54, 0x59, 0x3F, + 0x00, 0xA0, 0x30, 0xB9, 0xF8, 0xD4, 0x4D, 0x3F, 0xF5, 0x28, 0x23, 0xBF, 0x7F, 0xE2, 0x74, 0x3F, 0xC7, 0xA6, 0x3C, 0x3F, 0x19, 0xBC, 0x75, 0x3F, + 0x4F, 0x0B, 0x72, 0x3F, 0x10, 0x06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, 0x3F, + 0x2E, 0x17, 0x8A, 0xBE, 0xD0, 0x9F, 0x03, 0xBF, 0x00, 0x62, 0xBE, 0xBD, 0x10, 0xDE, 0x84, 0xBD, 0xAA, 0x77, 0xFB, 0x3E, 0x7B, 0x0C, 0x33, 0x3F, + 0x29, 0x09, 0x74, 0x3F, 0x86, 0xA8, 0xD8, 0x3E, 0x8F, 0xCC, 0x50, 0x3F, 0x2C, 0x19, 0x0E, 0xBE, 0x49, 0x7E, 0x3A, 0x3F, 0x0F, 0x9A, 0xA0, 0xBE, + 0x3B, 0x91, 0x21, 0x3F, 0xF3, 0xC6, 0x46, 0x3F, 0xF9, 0xC7, 0xCC, 0xBE, 0x33, 0xDF, 0x28, 0xBF, 0xB0, 0xE8, 0x53, 0x3F, 0xD6, 0xC4, 0x72, 0x3F, + 0x35, 0x30, 0x79, 0x3F, 0x03, 0xBA, 0x66, 0x3F, +}; // data_15b8dc20 (test output layer 1) + +static uint8_t data_510d7f38[128] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output layer 2 + 0x82, 0xCB, 0x1E, 0x3F, 0x71, 0x57, 0x77, 0xBF, 0x3C, 0x33, 0x59, 0xBF, 0xCF, 0xBD, 0x45, 0x3F, 0x4F, 0xFA, 0x7F, 0xBF, 0x0C, 0xA9, 0x8C, 0x3E, + 0xFE, 0x06, 0x50, 0x3F, 0xD6, 0xFE, 0x7F, 0xBF, 0x4C, 0x64, 0x7F, 0x3F, 0xBE, 0x55, 0x17, 0x3F, 0x8F, 0xD9, 0x39, 0x3F, 0xEE, 0x4C, 0x49, 0x3F, + 0x79, 0xD0, 0x7F, 0xBF, 0xCB, 0x2A, 0x48, 0xBF, 0x2F, 0x8F, 0x77, 0x3E, 0xA5, 0xF6, 0x7F, 0xBF, 0xE8, 0x29, 0x60, 0x3F, 0x37, 0xF6, 0x7F, 0xBF, + 0x07, 0xFE, 0x7F, 0xBF, 0xCF, 0x43, 0x7F, 0xBF, 0xCD, 0xAF, 0x55, 0xBF, 0xB2, 0xED, 0x6B, 0x3F, 0x5E, 0xC0, 0x6D, 0x3F, 0x2E, 0xE1, 0x7F, 0xBF, + 0xBE, 0xA9, 0x7A, 0x3F, 0x6D, 0xEF, 0x8E, 0x3E, 0x68, 0xDE, 0x26, 0x3F, 0xBD, 0xF9, 0x73, 0x3F, 0x02, 0xF8, 0x7F, 0xBF, 0x5B, 0x62, 0x7D, 0xBF, + 0x9E, 0x71, 0x36, 0xBF, 0x76, 0x6F, 0x1C, 0xBF, +}; // data_510d7f38 (test output layer 2) + + +#define COMPAREb00bf70c(LAYER, MATRIX1, MATRIX2) \ + if((((MATRIX1).array() - (MATRIX2).array()).abs() > 1e-5f).any()) { \ + std::cerr << "*** Conv model b00bf70c TEST FAILURE AT LAYER " << LAYER << " ***\n"; \ + std::cerr << "Got:\n" << (MATRIX1) << "\nExpected:\n" << (MATRIX2) << "\n"; \ + std::cerr << "Diff:\n" << (MATRIX1) - (MATRIX2) << "\n"; \ + return ModelCOutput_b00bf70c::Zero(); \ + } \ + else { \ + std::cerr << "Conv model b00bf70c LAYER " << LAYER << " successful.\n"; \ + } +#endif + +DMZ_INTERNAL ModelCOutput_b00bf70c applyc_b00bf70c(const ModelCInput_b00bf70c& input, bool test_generated_models) { + + ModelCInput_b00bf70c normalized_input = input; + + // Apply convolutional layer(s) + Eigen::Map mapped_input((float *)normalized_input.data()); + ModelCConvResult_b00bf70c_1 convolution_result_1 = convolve_b00bf70c_1(mapped_input); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_1((float *)data_15b8dc20); + COMPAREb00bf70c(1, convolution_result_1, known_good_output_1) + } +#endif // Apply hidden layer Eigen::Map hidden_W((float *)data_ca6a3f04); Eigen::Map hidden_b((float *)data_e549e672); - ModelCHiddenResult_b00bf70c hidden_result = hidden_W * accumulated_convolutions + hidden_b; - hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanhf)); + Eigen::Map< Eigen::Matrix > mapped_conv_result(convolution_result_1.data()); + ModelCHiddenResult_b00bf70c hidden_result = hidden_W * mapped_conv_result + hidden_b; + hidden_result = hidden_result.unaryExpr(std::ptr_fun(tanh)); +#if TEST_GENERATED_MODELS + if (test_generated_models) { + Eigen::Map known_good_output_hidden((float *)data_510d7f38); + COMPAREb00bf70c("Hidden", hidden_result, known_good_output_hidden) + } +#endif // Apply logistic layer Eigen::Map logistic_W((float *)data_c05fb198); @@ -1941,105 +2070,110 @@ DMZ_INTERNAL ModelCOutput_b00bf70c applyc_b00bf70c(const ModelCInput_b00bf70c& i #include -static uint8_t data_31c0cc47_b00bf70c[2052] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input - 0x46, 0x41, 0xAE, 0x3C, 0x45, 0x9D, 0x58, 0x3F, 0x23, 0x19, 0x59, 0x3F, 0x1D, 0x19, 0xD6, 0x3E, 0xDB, 0x2C, 0xC9, 0x3E, 0xA3, 0x68, 0x48, 0x3D, - 0x40, 0xFF, 0xDB, 0x3E, 0x1A, 0x75, 0x62, 0x3F, 0xA5, 0xCD, 0x78, 0x3F, 0x4E, 0xDE, 0x1F, 0x3F, 0xC9, 0x10, 0xD2, 0x3E, 0x3A, 0x62, 0xC6, 0x3E, - 0x59, 0xC1, 0x6B, 0x3E, 0x56, 0xE0, 0x37, 0x3F, 0x84, 0x91, 0x50, 0x3F, 0x93, 0x45, 0x85, 0x3C, 0xB8, 0x75, 0x34, 0x3F, 0xC4, 0xFF, 0x2C, 0x3F, - 0x1B, 0xCC, 0xF9, 0x3E, 0x4A, 0xB5, 0x69, 0x3E, 0x47, 0x53, 0xFB, 0x3D, 0x12, 0xB9, 0xE8, 0x3E, 0xEB, 0x9E, 0x55, 0x3F, 0xAC, 0x23, 0x79, 0x3E, - 0x37, 0xC8, 0x57, 0x3F, 0xB5, 0xF6, 0x0E, 0x3F, 0x9A, 0xF8, 0x8B, 0x3E, 0x7F, 0xBC, 0x2A, 0x3F, 0x2D, 0x05, 0x61, 0x3F, 0x75, 0xC0, 0x5F, 0x3F, - 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F, 0x70, 0xA7, 0x4C, 0x3F, 0x16, 0xAF, 0x55, 0x3F, 0x90, 0xE8, 0xBD, 0x3E, - 0x62, 0xF0, 0x4A, 0x3F, 0xC9, 0x75, 0xFC, 0x3E, 0x05, 0x19, 0x42, 0x3E, 0x0A, 0xC3, 0xAD, 0x3E, 0xE8, 0x6A, 0x2C, 0x3E, 0x2F, 0xD8, 0xE0, 0x3E, - 0xC5, 0x9A, 0xF1, 0x3D, 0x15, 0x45, 0x1F, 0x3F, 0x04, 0x67, 0x8E, 0x3E, 0x10, 0xD2, 0x30, 0x3D, 0x90, 0x8D, 0x34, 0x3F, 0xBC, 0x9B, 0x89, 0x3E, - 0x42, 0x2E, 0x49, 0x3D, 0x85, 0x43, 0x4E, 0x3F, 0x7B, 0xA0, 0x7B, 0x3F, 0xEB, 0xEF, 0x4A, 0x3F, 0x03, 0xC8, 0x1C, 0x3F, 0x50, 0xB8, 0x90, 0x3E, - 0x24, 0x4D, 0x82, 0x3E, 0xF5, 0x69, 0x22, 0x3F, 0x05, 0xBA, 0x59, 0x3F, 0xE0, 0x08, 0xA6, 0x3E, 0xE7, 0x63, 0x58, 0x3E, 0x30, 0xA4, 0x21, 0x3F, - 0xC4, 0x61, 0x86, 0x3E, 0x03, 0x6A, 0x7A, 0x3F, 0x70, 0xA1, 0x01, 0x3F, 0xE1, 0x0A, 0x0B, 0x3D, 0x08, 0xC0, 0x6F, 0x3F, 0x28, 0x0A, 0x1D, 0x3F, - 0x74, 0x75, 0x63, 0x3F, 0xAD, 0x86, 0x91, 0x3E, 0xEB, 0xB3, 0x1E, 0x3F, -}; // data_31c0cc47_b00bf70c (test input) - -static uint8_t data_7c53d215[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output - 0x17, 0x63, 0x92, 0x2D, 0xEA, 0x06, 0x8B, 0x3A, 0x99, 0x1C, 0x8F, 0x33, 0x91, 0x0B, 0x76, 0x34, 0x3D, 0x20, 0xEF, 0x39, 0xA1, 0x3B, 0x97, 0x26, - 0x33, 0xFC, 0x02, 0x33, 0xC5, 0x99, 0x0A, 0x36, 0x26, 0xA6, 0x65, 0x3F, 0x53, 0xB2, 0xCF, 0x3D, -}; // data_7c53d215 (test output) +static uint8_t data_eb133b26_b00bf70c[2052] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input + 0x9F, 0x7E, 0x67, 0x3F, 0x56, 0xC1, 0xB0, 0x3E, 0xD3, 0x49, 0x30, 0x3F, 0xCE, 0x4C, 0x87, 0x3E, 0x67, 0xF4, 0x11, 0x3F, 0xD8, 0x26, 0x3C, 0x3F, + 0x57, 0xB9, 0x26, 0x3F, 0x8B, 0x71, 0x3F, 0x3F, 0xC7, 0x60, 0x07, 0x3F, 0x54, 0x64, 0x73, 0x3E, 0x55, 0x98, 0x35, 0x3C, 0x92, 0x69, 0x45, 0x3F, + 0xF3, 0x4E, 0xBF, 0x3E, 0x87, 0xE5, 0x5C, 0x3E, 0xBB, 0xC0, 0xBA, 0x3C, 0xD7, 0xF2, 0x47, 0x3E, 0x49, 0xEB, 0x0B, 0x3F, 0xB5, 0x9C, 0xAC, 0x3E, + 0x88, 0xBF, 0xBA, 0x3E, 0x28, 0x0C, 0x40, 0x3E, 0xD7, 0x83, 0xF6, 0x3E, 0xC0, 0xC0, 0x65, 0x3E, 0xF3, 0x0F, 0x5B, 0x3F, 0xA3, 0xA9, 0x11, 0x3F, + 0xEC, 0x7A, 0x97, 0x3E, 0x9A, 0x0A, 0x3F, 0x3F, 0x04, 0x93, 0x57, 0x3F, 0x11, 0x2A, 0xAA, 0x3E, 0xA3, 0xB9, 0x38, 0x3F, 0x0C, 0x16, 0xA9, 0x3A, + 0x2C, 0x3B, 0x0A, 0x3F, 0x01, 0x84, 0x0B, 0x3F, 0xAD, 0xAC, 0x66, 0x3F, 0xB3, 0x28, 0xE2, 0x3E, 0x79, 0x2F, 0x52, 0x3F, 0x84, 0xDE, 0x02, 0x3F, + 0x91, 0x3C, 0x7F, 0x3F, 0xF5, 0xB9, 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0x3E, 0xE4, 0x59, 0x2D, 0x3F, 0xF3, 0x42, 0x05, 0x3F, + 0x57, 0x6F, 0xFB, 0x3C, 0x7B, 0x4B, 0x73, 0x3E, 0xCB, 0x16, 0xBD, 0x3E, 0xAD, 0xCE, 0x6E, 0x3F, 0x92, 0x4C, 0x5D, 0x3D, 0xAC, 0x01, 0xE1, 0x3E, + 0x16, 0x25, 0x2D, 0x3F, 0x3D, 0x4C, 0x3B, 0x3F, 0xDB, 0x95, 0xCE, 0x3A, 0x11, 0xEF, 0x90, 0x3E, 0xDF, 0xE3, 0xF4, 0x3D, 0xD9, 0xD2, 0x1B, 0x3E, + 0x58, 0x01, 0xBE, 0x3D, 0x37, 0x6C, 0x67, 0x3E, 0x9F, 0xB8, 0x20, 0x3F, 0xF3, 0x87, 0xD6, 0x3E, 0x8D, 0x1C, 0x2E, 0x3F, 0x4E, 0x1F, 0x17, 0x3F, + 0x77, 0x92, 0xA3, 0x3E, 0x20, 0xB0, 0x69, 0x3F, 0x53, 0x11, 0x13, 0x3E, 0x06, 0xED, 0x6F, 0x3E, 0x20, 0x23, 0xBE, 0x3E, 0x9F, 0x90, 0x42, 0x3E, + 0x8B, 0x89, 0x15, 0x3E, 0x05, 0x5F, 0x20, 0x3F, 0x25, 0xE2, 0x18, 0x3E, +}; // data_eb133b26_b00bf70c (test input) + +static uint8_t data_d44e0707[40] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output + 0x55, 0x79, 0x3E, 0x28, 0xF0, 0xFF, 0x7F, 0x3F, 0x8A, 0xD5, 0x87, 0x2A, 0x17, 0x02, 0x32, 0x32, 0x04, 0xB8, 0x25, 0x35, 0xCE, 0xFD, 0xA8, 0x2F, + 0xCA, 0x4A, 0x57, 0x32, 0x7A, 0x1E, 0xA8, 0x2A, 0x55, 0x51, 0x9F, 0x34, 0x49, 0xE8, 0xE3, 0x29, +}; // data_d44e0707 (test output) bool passc_b00bf70c() { - Eigen::Map test_input((float *)data_31c0cc47_b00bf70c); - ModelCOutput_b00bf70c computed_output = applyc_b00bf70c(test_input); - Eigen::Map known_good_output((float *)data_7c53d215); + Eigen::Map test_input((float *)data_eb133b26_b00bf70c); + ModelCOutput_b00bf70c computed_output = applyc_b00bf70c(test_input, true); + + if (computed_output.array().isZero(1e-3f)) { + return false; + } + + Eigen::Map known_good_output((float *)data_d44e0707); if(((computed_output.array() - known_good_output.array()).abs() > 1e-5f).any()) { // TODO: Return more useful info here, rather than printing to stderr... diff --git a/models/generated/modelc_b00bf70c.hpp b/models/generated/modelc_b00bf70c.hpp index 3db37db..ccc8208 100644 --- a/models/generated/modelc_b00bf70c.hpp +++ b/models/generated/modelc_b00bf70c.hpp @@ -2,7 +2,7 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/conv/ms_n19_10f_nk8-0_fs0-3-3_ps0-3-3_h32_bm-valid_ib-True_b50_lr0.25_conv.model.pkl +// Autogenerated from models/conv/numbers2.model.pkl // @@ -15,7 +15,7 @@ typedef Eigen::Matrix ModelCInput_b00bf70c; typedef Eigen::Matrix ModelCOutput_b00bf70c; -DMZ_INTERNAL ModelCOutput_b00bf70c applyc_b00bf70c(const ModelCInput_b00bf70c& input); +DMZ_INTERNAL ModelCOutput_b00bf70c applyc_b00bf70c(const ModelCInput_b00bf70c& input, bool test_generated_models = false); #if TEST_GENERATED_MODELS diff --git a/models/generated/modelm_befe75da.cpp b/models/generated/modelm_befe75da.cpp index 8fbb4ac..1139097 100644 --- a/models/generated/modelm_befe75da.cpp +++ b/models/generated/modelm_befe75da.cpp @@ -2,17 +2,18 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/mlp/strips_sharded_crop_grad_d2_norm_n50_b150_mlp.model.pkl +// Autogenerated from models/mlp/strips.model.pkl // #include "compile.h" #if COMPILE_DMZ -#define EIGEN_NO_DEBUG 1 // turn off range checking and anything else that could slow us down! - #include "modelm_befe75da.hpp" + +// Hidden layer 1 of 1 + static uint8_t data_b3289e07[40800] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden W 0xD9, 0x30, 0x8D, 0x3E, 0x55, 0x3D, 0x97, 0x3D, 0xA8, 0x9A, 0x2B, 0xBD, 0x01, 0xA5, 0x0F, 0xBE, 0xFF, 0xEF, 0xA3, 0xBE, 0xB0, 0x15, 0xD0, 0xBE, 0xD0, 0xBD, 0x21, 0xBE, 0x4D, 0x76, 0xF0, 0xBC, 0x59, 0xA0, 0x68, 0x3D, 0xC8, 0x93, 0xBE, 0xBC, 0xE7, 0xFE, 0x0A, 0xBE, 0x0E, 0x62, 0x82, 0xBD, @@ -1728,6 +1729,13 @@ static uint8_t data_dd02e979[200] EIGEN_ALIGN_TO_BOUNDARY(16) = { // hidden b 0xD3, 0xEE, 0x66, 0x3E, 0xEB, 0x02, 0x2F, 0xBF, }; // data_dd02e979 (hidden b) +typedef Eigen::Matrix ModelMHiddenW_befe75da_1; +typedef Eigen::Matrix ModelMHiddenB_befe75da_1; +typedef Eigen::Matrix ModelMIntermediateResult_befe75da_1; + + +// Logistic layer + static uint8_t data_209a6565[600] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic W 0xAD, 0xD8, 0x84, 0x3F, 0x32, 0x43, 0xBC, 0xBF, 0x61, 0x88, 0xC4, 0x3F, 0x35, 0xDB, 0xB3, 0xBF, 0x3E, 0xB0, 0x37, 0xC0, 0x7B, 0x90, 0xB2, 0xBF, 0x44, 0xDC, 0x0D, 0xC0, 0x03, 0xF1, 0x03, 0xC0, 0x95, 0xD4, 0x97, 0x3F, 0xC0, 0x01, 0xEB, 0xBF, 0xEC, 0xC9, 0xD5, 0x3F, 0x6E, 0xA3, 0xC2, 0x3F, @@ -1761,24 +1769,23 @@ static uint8_t data_da0dff50[12] EIGEN_ALIGN_TO_BOUNDARY(16) = { // logistic b }; // data_da0dff50 (logistic b) -typedef Eigen::Matrix ModelMHiddenW_befe75da; -typedef Eigen::Matrix ModelMHiddenB_befe75da; -typedef Eigen::Matrix ModelMIntermediateResult_befe75da; typedef Eigen::Matrix ModelMLogisticW_befe75da; typedef Eigen::Matrix ModelMLogisticB_befe75da; DMZ_INTERNAL ModelMOutput_befe75da applym_befe75da(const ModelMInput_befe75da& input) { - Eigen::Map hidden_W((float *)data_b3289e07); - Eigen::Map hidden_b((float *)data_dd02e979); - ModelMIntermediateResult_befe75da intermediate_result = hidden_W * input + hidden_b; - intermediate_result = intermediate_result.unaryExpr(std::ptr_fun(tanhf)); +// Hidden layer 1 of 1 + Eigen::Map hidden_W_1((float *)data_b3289e07); + Eigen::Map hidden_b_1((float *)data_dd02e979); + ModelMIntermediateResult_befe75da_1 intermediate_result_1 = hidden_W_1 * input + hidden_b_1; + intermediate_result_1 = intermediate_result_1.unaryExpr(std::ptr_fun(tanhf)); +// Logistic layer Eigen::Map logistic_W((float *)data_209a6565); Eigen::Map logistic_b((float *)data_da0dff50); - - ModelMOutput_befe75da output = logistic_W * intermediate_result + logistic_b; + ModelMOutput_befe75da output = logistic_W * intermediate_result_1 + logistic_b; output = output.unaryExpr(std::ptr_fun(expf)); + float sum = output.sum(); output /= sum; @@ -1790,7 +1797,7 @@ DMZ_INTERNAL ModelMOutput_befe75da applym_befe75da(const ModelMInput_befe75da& i #include -static uint8_t data_93d4c7ac[816] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input +static uint8_t data_93d4c7ac_befe75da[816] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input 0x46, 0x41, 0xAE, 0x3C, 0x45, 0x9D, 0x58, 0x3F, 0x23, 0x19, 0x59, 0x3F, 0x1D, 0x19, 0xD6, 0x3E, 0xDB, 0x2C, 0xC9, 0x3E, 0xA3, 0x68, 0x48, 0x3D, 0x40, 0xFF, 0xDB, 0x3E, 0x1A, 0x75, 0x62, 0x3F, 0xA5, 0xCD, 0x78, 0x3F, 0x4E, 0xDE, 0x1F, 0x3F, 0xC9, 0x10, 0xD2, 0x3E, 0x3A, 0x62, 0xC6, 0x3E, 0x59, 0xC1, 0x6B, 0x3E, 0x56, 0xE0, 0x37, 0x3F, 0x84, 0x91, 0x50, 0x3F, 0x93, 0x45, 0x85, 0x3C, 0xB8, 0x75, 0x34, 0x3F, 0xC4, 0xFF, 0x2C, 0x3F, @@ -1825,19 +1832,19 @@ static uint8_t data_93d4c7ac[816] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test input 0x69, 0x2F, 0x68, 0x3F, 0xD3, 0x37, 0x60, 0x3F, 0x89, 0xEF, 0x44, 0x3F, 0x0B, 0x01, 0x27, 0x3E, 0xAC, 0x2C, 0xF3, 0x3E, 0x0F, 0x39, 0x3B, 0x3F, 0x76, 0x63, 0x58, 0x3F, 0xCB, 0xA2, 0x3D, 0x3E, 0x4F, 0xCD, 0x5E, 0x3F, 0x43, 0x22, 0x12, 0x3E, 0xC5, 0x1B, 0x01, 0x3F, 0xCA, 0x96, 0x30, 0x3F, 0x1C, 0x2B, 0x76, 0x3F, 0xBD, 0x77, 0x4B, 0x3F, 0xFB, 0x2F, 0x9E, 0x3E, 0x03, 0x1B, 0x41, 0x3F, 0x13, 0x0B, 0x31, 0x3F, 0x0B, 0x11, 0x69, 0x3C, -}; // data_93d4c7ac (test input) +}; // data_93d4c7ac_befe75da (test input) -static uint8_t data_b8937695[12] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output +static uint8_t data_b8937695_befe75da[12] EIGEN_ALIGN_TO_BOUNDARY(16) = { // test output 0xBF, 0xFF, 0x7F, 0x3F, 0xA1, 0x06, 0x6A, 0x36, 0xE2, 0x73, 0xDA, 0x34, -}; // data_b8937695 (test output) +}; // data_b8937695_befe75da (test output) bool passm_befe75da() { - Eigen::Map test_input((float *)data_93d4c7ac); + Eigen::Map test_input((float *)data_93d4c7ac_befe75da); ModelMOutput_befe75da computed_output = applym_befe75da(test_input); - Eigen::Map known_good_output((float *)data_b8937695); + Eigen::Map known_good_output((float *)data_b8937695_befe75da); - if(((computed_output.array() - known_good_output.array()).abs() > 1e-5f).any()) { + if(((computed_output.array() - known_good_output.array()).abs() > (float)1e-5).any()) { // TODO: Return more useful info here, rather than printing to stderr... std::cerr << "MLP model befe75da test failure:\nGot " << computed_output << "\nExpected " << known_good_output << "\n"; return false; diff --git a/models/generated/modelm_befe75da.hpp b/models/generated/modelm_befe75da.hpp index 273cc72..d760777 100644 --- a/models/generated/modelm_befe75da.hpp +++ b/models/generated/modelm_befe75da.hpp @@ -2,7 +2,7 @@ // // DO NOT EDIT HERE. -// Autogenerated from models/mlp/strips_sharded_crop_grad_d2_norm_n50_b150_mlp.model.pkl +// Autogenerated from models/mlp/strips.model.pkl //