diff --git a/mobile/test/fpga/test_marker_api.cpp b/mobile/test/fpga/test_marker_api.cpp index 29cf6561df1afae1fae5494bcb8fa6606d3999df..19e051a38d2b853dda8a9364ac1ea64ae3f38acb 100644 --- a/mobile/test/fpga/test_marker_api.cpp +++ b/mobile/test/fpga/test_marker_api.cpp @@ -104,7 +104,7 @@ void dump_stride_float(std::string filename, void dump_stride(std::string filename, paddle_mobile::PaddleTensor input_tensor) { - if (input_tensor.dtypeid == type_id().hash_code()) { + if (input_tensor.dtypeid == PaddlekTypeId_t::paddle_float) { dump_stride_float(filename, input_tensor); } else { std::cout << "only support dumping float data" << std::endl; @@ -156,13 +156,13 @@ int main() { std::cout << "Finishing initializing data" << std::endl; struct PaddleTensor t_img_info, t_img; - t_img_info.dtypeid = type_id().hash_code(); + t_img_info.dtypeid = PaddlekTypeId_t::paddle_float; t_img_info.layout = LAYOUT_HWC; t_img_info.shape = std::vector({1, 3}); t_img_info.name = "Image information"; t_img_info.data.Reset(img_info, 3 * sizeof(float)); - t_img.dtypeid = type_id().hash_code(); + t_img.dtypeid = PaddlekTypeId_t::paddle_float; // quantize(&img, img_length); // t_img.dtypeid = typeid(int8_t); t_img.layout = LAYOUT_HWC; @@ -209,7 +209,7 @@ int main() { std::cout << "Finishing initializing data" << std::endl; struct PaddleTensor t_img1; - t_img1.dtypeid = type_id().hash_code(); + t_img1.dtypeid = PaddlekTypeId_t::paddle_float; t_img1.layout = LAYOUT_HWC; t_img1.shape = std::vector({1, 14, 14, 144}); t_img1.name = "Image information"; diff --git a/mobile/test/fpga/test_mobilenet_api.cpp b/mobile/test/fpga/test_mobilenet_api.cpp index 09392e9d38f8a0312715da2aae74e1e039c2452e..5c0a594ca8c4692b7c0a07afb72bf260b3c6086d 100644 --- a/mobile/test/fpga/test_mobilenet_api.cpp +++ b/mobile/test/fpga/test_mobilenet_api.cpp @@ -96,7 +96,7 @@ void dump_stride_float(std::string filename, PaddleTensor input_tensor) { } void dump_stride(std::string filename, PaddleTensor input_tensor) { - if (input_tensor.dtypeid == type_id().hash_code()) { + if (input_tensor.dtypeid == PaddlekTypeId_t::paddle_float) { dump_stride_float(filename, input_tensor); } else { std::cout << "only support dumping float data" << std::endl; @@ -131,7 +131,7 @@ int main() { std::cout << "Finishing initializing data" << std::endl; struct PaddleTensor t_img; t_img.dtype = FLOAT32; - t_img.dtypeid = type_id().hash_code(); + t_img.dtypeid = PaddlekTypeId_t::paddle_float; // quantize(&img, img_length); // t_img.dtype = INT8; // t_img.dtypeid = typeid(int8_t); diff --git a/mobile/test/fpga/test_rfcn_api.cpp b/mobile/test/fpga/test_rfcn_api.cpp index e86743cc7e7b8fdb48a034aebd5a53224674b6f5..b8b031bf59a47b7ac9a0f71b828596aaad15e3f1 100644 --- a/mobile/test/fpga/test_rfcn_api.cpp +++ b/mobile/test/fpga/test_rfcn_api.cpp @@ -117,13 +117,13 @@ int main() { std::cout << "Finishing initializing data" << std::endl; struct PaddleTensor t_img_info, t_img; - t_img.dtypeid = type_id().hash_code(); + t_img.dtypeid = PaddlekTypeId_t::paddle_float; t_img_info.layout = LAYOUT_HWC; t_img_info.shape = std::vector({1, 3}); t_img_info.name = "Image information"; t_img_info.data.Reset(img_info, 3 * sizeof(float)); - t_img.dtypeid = type_id().hash_code(); + t_img.dtypeid = PaddlekTypeId_t::paddle_float; t_img.layout = LAYOUT_HWC; t_img.shape = std::vector({1, 432, 1280, 3}); t_img.name = "Image information"; diff --git a/mobile/test/fpga/test_yolo_api.cpp b/mobile/test/fpga/test_yolo_api.cpp index f8f1a48abca74b76f77e7f8d59371b7672a8b453..161d695418654b2198a59889ee44583901d25c2b 100644 --- a/mobile/test/fpga/test_yolo_api.cpp +++ b/mobile/test/fpga/test_yolo_api.cpp @@ -95,7 +95,7 @@ void dump_stride_float(std::string filename, PaddleTensor input_tensor) { } void dump_stride(std::string filename, PaddleTensor input_tensor) { - if (input_tensor.dtypeid == type_id().hash_code()) { + if (input_tensor.dtypeid == PaddlekTypeId_t::paddle_float) { dump_stride_float(filename, input_tensor); } else { std::cout << "only support dumping float data" << std::endl; @@ -134,7 +134,7 @@ int main() { // t_img.dtypeid = type_id().hash_code(); quantize(&img, img_length); t_img.dtype = INT8; - t_img.dtypeid = type_id().hash_code(); + t_img.dtypeid = PaddlekTypeId_t::paddle_int8_t; t_img.layout = LAYOUT_HWC; t_img.shape = std::vector({1, 256, 416, 3}); t_img.name = "Image information";