Skip to content

Commit

Permalink
add more model ut
Browse files Browse the repository at this point in the history
  • Loading branch information
shentanyue committed Feb 21, 2022
1 parent f46f0a2 commit 43c4488
Show file tree
Hide file tree
Showing 34 changed files with 3,519 additions and 25 deletions.
55 changes: 43 additions & 12 deletions lite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ if (WITH_TESTING)
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "SqueezeNet1_0_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "VGG16_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "VGG19_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "DarkNet53.tar.gz" MODEL_PATH "PaddleClas/v2.3/DarkNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "DarkNet53.tar.gz" MODEL_PATH "PaddleClas/v2.3/DarkNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "DeiT_base_patch16_224.tar.gz" MODEL_PATH "PaddleClas/v2.3/DeiT")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "DPN68.tar.gz" MODEL_PATH "PaddleClas/v2.3/DPN")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "GhostNet_x1_0.tar.gz" MODEL_PATH "PaddleClas/v2.3/GhostNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "HRNet_W18_C.tar.gz" MODEL_PATH "PaddleClas/v2.3/HRNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "PPLCNet_x0_25.tar.gz" MODEL_PATH "PaddleClas/v2.3/PPLCNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "Res2Net50_26w_4s.tar.gz" MODEL_PATH "PaddleClas/v2.3/Res2Net")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "SE_ResNet50_vd.tar.gz" MODEL_PATH "PaddleClas/v2.3/SENet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ViT_base_patch16_224.tar.gz" MODEL_PATH "PaddleClas/v2.3/VisionTransformer")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "DPN68.tar.gz" MODEL_PATH "PaddleClas/v2.3/DPN")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "GhostNet_x1_0.tar.gz" MODEL_PATH "PaddleClas/v2.3/GhostNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "HRNet_W18_C.tar.gz" MODEL_PATH "PaddleClas/v2.3/HRNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "PPLCNet_x0_25.tar.gz" MODEL_PATH "PaddleClas/v2.3/PPLCNet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "Res2Net50_26w_4s.tar.gz" MODEL_PATH "PaddleClas/v2.3/Res2Net")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "SE_ResNet50_vd.tar.gz" MODEL_PATH "PaddleClas/v2.3/SENet")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ViT_base_patch16_224.tar.gz" MODEL_PATH "PaddleClas/v2.3/VisionTransformer")
# PaddleDetection
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ssd_mobilenet_v1_relu_voc_v2_2.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ssd_vgg16_voc_v2_2.tar.gz")
Expand All @@ -90,13 +90,42 @@ if (WITH_TESTING)
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ppyolo_r50vd_dcn_1x_coco_v2_2.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "higherhrnet_hrnet_w32_640_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "hrnet_w32_384x288_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "picodet_m_416_coco.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ppyolo_mbv3_large_coco.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ppyolo_r50vd_dcn_1x_coco.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ppyolo_tiny_650e_coco.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ppyolov2_r50vd_dcn_365e_coco.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "tinypose_128x96.tar.gz" MODEL_PATH "PaddleDetection/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ssdlite_mobilenet_v3_small.tar.gz" MODEL_PATH "PaddleDetection/static")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ssdlite_mobilenet_v3_large.tar.gz" MODEL_PATH "PaddleDetection/static")
# PaddleSeg
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "bisenet.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "segformer.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "stdcseg.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "unet_cityscapes_1024x512_160k.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "deeplabv3p_resnet50_os8_cityscapes_1024x512_80k.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "pphumanseg_lite_generic_192x192_with_softmax.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "deeplabv3p_resnet50_os8_humanseg_512x512_100k_with_softmax.tar.gz" MODEL_PATH "PaddleSeg/v2.3")
# PaddleOCR
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ch_ppocr_mobile_v2_0_rec_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ch_ppocr_mobile_v2_0_det_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "rec_crnn_mv3_ctc.tar.gz" MODEL_PATH "PaddleOCR")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_ppocr_mobile_v2_0_rec_v2_0.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_ppocr_mobile_v2_0_det_v2_0.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_ppocr_server_v2.0_rec_infer.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_ppocr_server_v2.0_det_infer.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_PP-OCRv2_det_infer.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ch_PP-OCRv2_rec_infer.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "e2e_server_pgnetA.tar.gz" MODEL_PATH "PaddleOCR/v2.3")
# PaddleNLP
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ernie_tiny_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ernie_tiny.tar.gz" MODEL_PATH "PaddleNLP")
# PaddleGAN
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "esrgan_psnr_x4_div2k_v2_0.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "esrgan_psnr_x4_div2k.tar.gz" MODEL_PATH "PaddleGAN")
# PaddleRec
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "deepfm.tar.gz" MODEL_PATH "PaddleRec/v2.1.0")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "naml.tar.gz" MODEL_PATH "PaddleRec/v2.1.0")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ncf.tar.gz" MODEL_PATH "PaddleRec/v2.1.0")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "wide_deep.tar.gz" MODEL_PATH "PaddleRec/v2.1.0")
# PaddleVideo
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_NNADAPTER_UNITTESTS} "ppTSN.tar.gz" MODEL_PATH "PaddleVideo/v2.2.0")
endif()
if(LITE_WITH_ARM)
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL} "mobilenet_v1_int16.tar.gz")
Expand Down Expand Up @@ -143,9 +172,11 @@ if (WITH_TESTING)
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "COCO2017_100.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ocr_db_data.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ocr_rec_data.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ocr_e2e_data.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "ernie_tiny_data.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "COCO2017_keypoints_100.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "GAN_set14.tar.gz")
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL_FOR_UNITTESTS} "specific_model_input_output.tar.gz")
endif()
endif()

Expand Down
37 changes: 33 additions & 4 deletions lite/tests/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,42 @@ if(LITE_WITH_NNADAPTER)
lite_cc_test_with_model_and_data(test_yolov3_r50vd_dcn_coco_fp32_v2_2_nnadapter SOURCE test_yolov3_r50vd_dcn_coco_fp32_v2_2_nnadapter.cc MODEL yolov3_r50vd_dcn_coco_v2_2 DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_yolov4_cspdarknet_coco_fp32_v1_8_nnadapter SOURCE test_yolov4_cspdarknet_coco_fp32_v1_8_nnadapter.cc MODEL yolov4_cspdarknet_coco_v1_8 DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ppyolo_r50vd_dcn_1x_coco_fp32_v2_2_nnadapter SOURCE test_ppyolo_r50vd_dcn_1x_coco_fp32_v2_2_nnadapter.cc MODEL ppyolo_r50vd_dcn_1x_coco_v2_2 DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ppyolo_r50vd_dcn_1x_coco_fp32_v2_3_nnadapter SOURCE test_ppyolo_r50vd_dcn_1x_coco_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/ppyolo_r50vd_dcn_1x_coco DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ppyolo_mbv3_large_coco_fp32_v2_3_nnadapter SOURCE test_ppyolo_mbv3_large_coco_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/ppyolo_mbv3_large_coco DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ppyolo_tiny_coco_fp32_v2_3_nnadapter SOURCE test_ppyolo_tiny_coco_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/ppyolo_tiny_650e_coco DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ppyolo2_r50vd_dcn_coco_fp32_v2_3_nnadapter SOURCE test_ppyolo2_r50vd_dcn_coco_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/ppyolov2_r50vd_dcn_365e_coco DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_picodet_coco_fp32_v2_3_nnadapter SOURCE test_picodet_coco_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/picodet_m_416_coco DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ssdlite_mobilenet_v3_large_coco_fp32_static_nnadapter SOURCE test_ssdlite_mobilenet_v3_large_coco_fp32_static_nnadapter.cc MODEL PaddleDetection/static/ssdlite_mobilenet_v3_small DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_ssdlite_mobilenet_v3_small_coco_fp32_static_nnadapter SOURCE test_ssdlite_mobilenet_v3_small_coco_fp32_static_nnadapter.cc MODEL PaddleDetection/static/ssdlite_mobilenet_v3_large DATA COCO2017_100)
lite_cc_test_with_model_and_data(test_higher_hrnet_w32_640_fp32_v2_0_nnadapter SOURCE test_higher_hrnet_w32_640_fp32_v2_0_nnadapter.cc MODEL higherhrnet_hrnet_w32_640_v2_0 DATA COCO2017_keypoints_100)
lite_cc_test_with_model_and_data(test_hrnet_w32_384x288_fp32_v2_0_nnadapter SOURCE test_hrnet_w32_384x288_fp32_v2_0_nnadapter.cc MODEL hrnet_w32_384x288_v2_0 DATA COCO2017_keypoints_100)
lite_cc_test_with_model_and_data(test_pptinypose_fp32_v2_3_nnadapter SOURCE test_pptinypose_fp32_v2_3_nnadapter.cc MODEL PaddleDetection/v2.3/tinypose_128x96 DATA specific_model_input_output)
# PaddleOCR
lite_cc_test_with_model_and_data(test_ch_ppocr_mobile_v2_0_det_fp32_v2_0_nnadapter SOURCE test_ch_ppocr_mobile_v2_0_det_fp32_v2_0_nnadapter.cc MODEL ch_ppocr_mobile_v2_0_det_v2_0 DATA ocr_db_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_mobile_v2_0_rec_fp32_v2_0_nnadapter SOURCE test_ch_ppocr_mobile_v2_0_rec_fp32_v2_0_nnadapter.cc MODEL ch_ppocr_mobile_v2_0_rec_v2_0 DATA ocr_rec_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_mobile_v2_0_det_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_mobile_v2_0_det_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_ppocr_mobile_v2_0_det_v2_0 DATA ocr_db_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_mobile_v2_0_rec_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_mobile_v2_0_rec_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_ppocr_mobile_v2_0_rec_v2_0 DATA ocr_rec_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_server_v2_0_det_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_server_v2_0_det_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_ppocr_server_v2.0_det_infer DATA ocr_db_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_server_v2_0_rec_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_server_v2_0_rec_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_ppocr_server_v2.0_rec_infer DATA ocr_rec_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_v2_det_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_v2_det_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_PP-OCRv2_det_infer DATA ocr_db_data)
lite_cc_test_with_model_and_data(test_ch_ppocr_v2_rec_fp32_v2_3_nnadapter SOURCE test_ch_ppocr_v2_rec_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/ch_PP-OCRv2_rec_infer DATA ocr_rec_data)
lite_cc_test_with_model_and_data(test_crnn_ctc_fp32_v2_3_nnadapter SOURCE test_crnn_ctc_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/rec_crnn_mv3_ctc DATA ocr_rec_data)
lite_cc_test_with_model_and_data(test_e2e_server_pgnetA_fp32_v2_3_nnadapter SOURCE test_e2e_server_pgnetA_fp32_v2_3_nnadapter.cc MODEL PaddleOCR/v2.3/e2e_server_pgnetA DATA ocr_e2e_data)
# PaddleNLP
lite_cc_test_with_model_and_data(test_ernie_tiny_fp32_v2_0_nnadapter SOURCE test_ernie_tiny_fp32_v2_0_nnadapter.cc MODEL ernie_tiny_v2_0 DATA ernie_tiny_data)
lite_cc_test_with_model_and_data(test_ernie_tiny_fp32_v2_0_nnadapter SOURCE test_ernie_tiny_fp32_v2_0_nnadapter.cc MODEL PaddleNLP/ernie_tiny DATA ernie_tiny_data)
# PaddleGAN
lite_cc_test_with_model_and_data(test_esrgan_psnr_x4_div2k_fp32_v2_0_nnadapter SOURCE test_esrgan_psnr_x4_div2k_fp32_v2_0_nnadapter.cc MODEL esrgan_psnr_x4_div2k_v2_0 DATA GAN_set14)
lite_cc_test_with_model_and_data(test_esrgan_psnr_x4_div2k_fp32_v2_0_nnadapter SOURCE test_esrgan_psnr_x4_div2k_fp32_v2_0_nnadapter.cc MODEL PaddleGAN/esrgan_psnr_x4_div2k DATA GAN_set14)
# PaddleRec
lite_cc_test_with_model_and_data(test_naml_fp32_v2_1_nnadapter SOURCE test_naml_fp32_v2_1_nnadapter.cc MODEL PaddleRec/v2.1.0/naml DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_deepfm_fp32_v2_1_nnadapter SOURCE test_deepfm_fp32_v2_1_nnadapter.cc MODEL PaddleRec/v2.1.0/deepfm DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_ncf_fp32_v2_1_nnadapter SOURCE test_ncf_fp32_v2_1_nnadapter.cc MODEL PaddleRec/v2.1.0/ncf DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_wide_deep_fp32_v2_1_nnadapter SOURCE test_wide_deep_fp32_v2_1_nnadapter.cc MODEL PaddleRec/v2.1.0/wide_deep DATA specific_model_input_output)
# PaddleSeg
lite_cc_test_with_model_and_data(test_segformer_fp32_v2_3_nnadapter SOURCE test_segformer_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/segformer DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_bisenet_fp32_v2_3_nnadapter SOURCE test_bisenet_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/bisenet DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_stdcseg_fp32_v2_3_nnadapter SOURCE test_stdcseg_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/stdcseg DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_pphumanseg_lite_fp32_v2_3_nnadapter SOURCE test_pphumanseg_lite_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/pphumanseg_lite_generic_192x192_with_softmax DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_unet_cityscapes_fp32_v2_3_nnadapter SOURCE test_unet_cityscapes_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/unet_cityscapes_1024x512_160k DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_deeplabv3p_resnet50_os8_cityscapes_fp32_v2_3_nnadapter SOURCE test_deeplabv3p_resnet50_os8_cityscapes_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/deeplabv3p_resnet50_os8_cityscapes_1024x512_80k DATA specific_model_input_output)
lite_cc_test_with_model_and_data(test_deeplabv3p_resnet50_os8_humanseg_fp32_v2_3_nnadapter SOURCE test_deeplabv3p_resnet50_os8_humanseg_fp32_v2_3_nnadapter.cc MODEL PaddleSeg/v2.3/deeplabv3p_resnet50_os8_humanseg_512x512_100k_with_softmax DATA specific_model_input_output)
# PaddleVideo
lite_cc_test_with_model_and_data(test_pptsn_fp32_v2_2_nnadapter SOURCE test_pptsn_fp32_v2_2_nnadapter.cc MODEL PaddleVideo/v2.2.0/ppTSN DATA specific_model_input_output)
endif()
6 changes: 1 addition & 5 deletions lite/tests/api/COCO2017_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,13 @@ std::vector<std::vector<T>> ReadRawData(
std::ifstream fin(raw_data_file_dir, std::ios::in | std::ios::binary);
CHECK(fin.is_open()) << "failed to open file " << raw_data_file_dir;
fin.seekg(0, std::ios::end);
int file_size = fin.tellg();
fin.seekg(0, std::ios::beg);
CHECK_EQ(static_cast<size_t>(file_size),
static_cast<size_t>(image_size) * sizeof(T) / sizeof(char));
fin.read(reinterpret_cast<char*>(data), file_size);
fin.read(reinterpret_cast<char*>(data), image_size * sizeof(T));
fin.close();
data += image_size;
}
raw_data.emplace_back(one_iter_raw_data);
}

return raw_data;
}

Expand Down
Loading

0 comments on commit 43c4488

Please sign in to comment.