提交 bd7216fd 编写于 作者: H hjchen2

Merge branch 'dev-latest' of https://github.com/hjchen2/paddle-mobile into dev-latest

......@@ -93,3 +93,6 @@ metal/paddle-mobile/paddle-mobile/CPU/libpaddle-mobile.a
*.xcuserdatad/
*/xcuserdata/
/venv/
metal/paddle-mobile-demo/paddle-mobile-demo/images
metal/paddle-mobile-demo/paddle-mobile-demo/models
......@@ -8,6 +8,232 @@
/* Begin PBXBuildFile section */
30D0ED21F392CFA3885B1002 /* Pods_paddle_mobile_demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18896810981724F8A0FED62A /* Pods_paddle_mobile_demo.framework */; };
C2A7541F219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75339219EF62700DF4209 /* params */; };
C2A75420219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533A219EF62700DF4209 /* model */; };
C2A75421219EF62800DF4209 /* combined_mobilenet_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533D219EF62700DF4209 /* combined_mobilenet_params */; };
C2A75422219EF62800DF4209 /* combined_mobilenet_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7533E219EF62700DF4209 /* combined_mobilenet_model */; };
C2A75423219EF62800DF4209 /* yolo_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75340219EF62700DF4209 /* yolo_params */; };
C2A75424219EF62800DF4209 /* yolo_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75341219EF62700DF4209 /* yolo_model */; };
C2A75425219EF62800DF4209 /* genet_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75343219EF62700DF4209 /* genet_params */; };
C2A75426219EF62800DF4209 /* genet_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75344219EF62700DF4209 /* genet_model */; };
C2A75427219EF62800DF4209 /* superresoltion_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75346219EF62700DF4209 /* superresoltion_params */; };
C2A75428219EF62800DF4209 /* superresoltion_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75347219EF62700DF4209 /* superresoltion_model */; };
C2A75429219EF62800DF4209 /* ssd_hand_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75349219EF62700DF4209 /* ssd_hand_params */; };
C2A7542A219EF62800DF4209 /* ssd_hand_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534A219EF62700DF4209 /* ssd_hand_model */; };
C2A7542B219EF62800DF4209 /* mobilenet in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534C219EF62700DF4209 /* mobilenet */; };
C2A7542C219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534D219EF62700DF4209 /* params */; };
C2A7542D219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534E219EF62700DF4209 /* model */; };
C2A7542E219EF62800DF4209 /* yolo in Resources */ = {isa = PBXBuildFile; fileRef = C2A7534F219EF62700DF4209 /* yolo */; };
C2A7542F219EF62800DF4209 /* params in Resources */ = {isa = PBXBuildFile; fileRef = C2A75351219EF62700DF4209 /* params */; };
C2A75430219EF62800DF4209 /* model in Resources */ = {isa = PBXBuildFile; fileRef = C2A75352219EF62700DF4209 /* model */; };
C2A75431219EF62800DF4209 /* batch_norm_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */; };
C2A75432219EF62800DF4209 /* batch_norm_26.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */; };
C2A75433219EF62800DF4209 /* batch_norm_32.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */; };
C2A75434219EF62800DF4209 /* conv2d_16.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75357219EF62700DF4209 /* conv2d_16.w_0 */; };
C2A75435219EF62800DF4209 /* batch_norm_15.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */; };
C2A75436219EF62800DF4209 /* batch_norm_29.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */; };
C2A75437219EF62800DF4209 /* batch_norm_4.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */; };
C2A75438219EF62800DF4209 /* batch_norm_5.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */; };
C2A75439219EF62800DF4209 /* batch_norm_28.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */; };
C2A7543A219EF62800DF4209 /* batch_norm_14.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */; };
C2A7543B219EF62800DF4209 /* conv2d_17.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */; };
C2A7543C219EF62800DF4209 /* batch_norm_33.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */; };
C2A7543D219EF62800DF4209 /* batch_norm_27.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */; };
C2A7543E219EF62800DF4209 /* batch_norm_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */; };
C2A7543F219EF62800DF4209 /* batch_norm_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */; };
C2A75440219EF62800DF4209 /* depthwise_conv2d_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */; };
C2A75441219EF62800DF4209 /* batch_norm_31.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */; };
C2A75442219EF62800DF4209 /* conv2d_29.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75365219EF62700DF4209 /* conv2d_29.w_0 */; };
C2A75443219EF62800DF4209 /* batch_norm_25.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */; };
C2A75444219EF62800DF4209 /* conv2d_15.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75367219EF62700DF4209 /* conv2d_15.w_0 */; };
C2A75445219EF62800DF4209 /* batch_norm_19.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */; };
C2A75446219EF62800DF4209 /* batch_norm_16.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */; };
C2A75447219EF62800DF4209 /* __model__ in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536A219EF62700DF4209 /* __model__ */; };
C2A75448219EF62800DF4209 /* batch_norm_7.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */; };
C2A75449219EF62800DF4209 /* batch_norm_6.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */; };
C2A7544A219EF62800DF4209 /* batch_norm_17.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */; };
C2A7544B219EF62800DF4209 /* conv2d_14.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */; };
C2A7544C219EF62800DF4209 /* batch_norm_18.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */; };
C2A7544D219EF62800DF4209 /* conv2d_28.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75370219EF62700DF4209 /* conv2d_28.w_0 */; };
C2A7544E219EF62800DF4209 /* batch_norm_24.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */; };
C2A7544F219EF62800DF4209 /* batch_norm_30.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */; };
C2A75450219EF62800DF4209 /* depthwise_conv2d_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */; };
C2A75451219EF62800DF4209 /* batch_norm_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */; };
C2A75452219EF62800DF4209 /* batch_norm_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */; };
C2A75453219EF62800DF4209 /* conv2d_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75376219EF62700DF4209 /* conv2d_10.w_0 */; };
C2A75454219EF62800DF4209 /* batch_norm_34.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */; };
C2A75455219EF62800DF4209 /* batch_norm_20.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */; };
C2A75456219EF62800DF4209 /* batch_norm_13.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */; };
C2A75457219EF62800DF4209 /* batch_norm_2.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */; };
C2A75458219EF62800DF4209 /* batch_norm_3.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */; };
C2A75459219EF62800DF4209 /* batch_norm_12.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */; };
C2A7545A219EF62800DF4209 /* batch_norm_21.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */; };
C2A7545B219EF62800DF4209 /* conv2d_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */; };
C2A7545C219EF62800DF4209 /* batch_norm_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */; };
C2A7545D219EF62800DF4209 /* batch_norm_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */; };
C2A7545E219EF62800DF4209 /* conv2d_13.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75381219EF62700DF4209 /* conv2d_13.w_0 */; };
C2A7545F219EF62800DF4209 /* batch_norm_23.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */; };
C2A75460219EF62800DF4209 /* batch_norm_10.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */; };
C2A75461219EF62800DF4209 /* batch_norm_1.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */; };
C2A75462219EF62800DF4209 /* batch_norm_0.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */; };
C2A75463219EF62800DF4209 /* batch_norm_11.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */; };
C2A75464219EF62800DF4209 /* batch_norm_22.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */; };
C2A75465219EF62800DF4209 /* conv2d_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75388219EF62700DF4209 /* conv2d_12.w_0 */; };
C2A75466219EF62800DF4209 /* batch_norm_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */; };
C2A75467219EF62800DF4209 /* batch_norm_21.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */; };
C2A75468219EF62800DF4209 /* batch_norm_3.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */; };
C2A75469219EF62800DF4209 /* batch_norm_22.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */; };
C2A7546A219EF62800DF4209 /* batch_norm_23.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */; };
C2A7546B219EF62800DF4209 /* batch_norm_2.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */; };
C2A7546C219EF62800DF4209 /* batch_norm_20.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */; };
C2A7546D219EF62800DF4209 /* batch_norm_34.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */; };
C2A7546E219EF62800DF4209 /* batch_norm_22.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */; };
C2A7546F219EF62800DF4209 /* batch_norm_0.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */; };
C2A75470219EF62800DF4209 /* batch_norm_21.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */; };
C2A75471219EF62800DF4209 /* batch_norm_20.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */; };
C2A75472219EF62800DF4209 /* batch_norm_34.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */; };
C2A75473219EF62800DF4209 /* batch_norm_1.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */; };
C2A75474219EF62800DF4209 /* batch_norm_23.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */; };
C2A75475219EF62800DF4209 /* batch_norm_27.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */; };
C2A75476219EF62800DF4209 /* batch_norm_33.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */; };
C2A75477219EF62800DF4209 /* batch_norm_5.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */; };
C2A75478219EF62800DF4209 /* batch_norm_18.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */; };
C2A75479219EF62800DF4209 /* batch_norm_30.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */; };
C2A7547A219EF62800DF4209 /* batch_norm_24.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */; };
C2A7547B219EF62800DF4209 /* conv2d_28.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */; };
C2A7547C219EF62800DF4209 /* batch_norm_25.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */; };
C2A7547D219EF62800DF4209 /* conv2d_29.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */; };
C2A7547E219EF62800DF4209 /* batch_norm_31.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */; };
C2A7547F219EF62800DF4209 /* batch_norm_19.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */; };
C2A75480219EF62800DF4209 /* batch_norm_4.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */; };
C2A75481219EF62800DF4209 /* batch_norm_32.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */; };
C2A75482219EF62800DF4209 /* batch_norm_26.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */; };
C2A75483219EF62800DF4209 /* batch_norm_30.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */; };
C2A75484219EF62800DF4209 /* batch_norm_24.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */; };
C2A75485219EF62800DF4209 /* batch_norm_18.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */; };
C2A75486219EF62800DF4209 /* batch_norm_6.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */; };
C2A75487219EF62800DF4209 /* batch_norm_9.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */; };
C2A75488219EF62800DF4209 /* conv2d_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */; };
C2A75489219EF62800DF4209 /* batch_norm_27.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */; };
C2A7548A219EF62800DF4209 /* batch_norm_33.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */; };
C2A7548B219EF62800DF4209 /* batch_norm_32.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */; };
C2A7548C219EF62800DF4209 /* conv2d_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */; };
C2A7548D219EF62800DF4209 /* batch_norm_26.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */; };
C2A7548E219EF62800DF4209 /* batch_norm_8.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */; };
C2A7548F219EF62800DF4209 /* batch_norm_7.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */; };
C2A75490219EF62800DF4209 /* batch_norm_19.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */; };
C2A75491219EF62800DF4209 /* batch_norm_25.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */; };
C2A75492219EF62800DF4209 /* batch_norm_31.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */; };
C2A75493219EF62800DF4209 /* batch_norm_28.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */; };
C2A75494219EF62800DF4209 /* batch_norm_14.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */; };
C2A75495219EF62800DF4209 /* batch_norm_5.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */; };
C2A75496219EF62800DF4209 /* batch_norm_17.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */; };
C2A75497219EF62800DF4209 /* conv2d_33.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */; };
C2A75498219EF62800DF4209 /* conv2d_27.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */; };
C2A75499219EF62800DF4209 /* conv2d_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */; };
C2A7549A219EF62800DF4209 /* conv2d_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */; };
C2A7549B219EF62800DF4209 /* conv2d_26.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */; };
C2A7549C219EF62800DF4209 /* conv2d_32.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */; };
C2A7549D219EF62800DF4209 /* batch_norm_16.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */; };
C2A7549E219EF62800DF4209 /* batch_norm_4.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */; };
C2A7549F219EF62800DF4209 /* batch_norm_15.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */; };
C2A754A0219EF62800DF4209 /* batch_norm_29.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */; };
C2A754A1219EF62800DF4209 /* batch_norm_17.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */; };
C2A754A2219EF62800DF4209 /* batch_norm_9.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */; };
C2A754A3219EF62800DF4209 /* batch_norm_6.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */; };
C2A754A4219EF62800DF4209 /* batch_norm_14.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */; };
C2A754A5219EF62800DF4209 /* batch_norm_28.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */; };
C2A754A6219EF62800DF4209 /* conv2d_24.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */; };
C2A754A7219EF62800DF4209 /* conv2d_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */; };
C2A754A8219EF62800DF4209 /* conv2d_30.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */; };
C2A754A9219EF62800DF4209 /* conv2d_31.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */; };
C2A754AA219EF62800DF4209 /* batch_norm_29.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */; };
C2A754AB219EF62800DF4209 /* conv2d_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */; };
C2A754AC219EF62800DF4209 /* conv2d_25.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */; };
C2A754AD219EF62800DF4209 /* batch_norm_15.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */; };
C2A754AE219EF62800DF4209 /* batch_norm_7.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */; };
C2A754AF219EF62800DF4209 /* batch_norm_8.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */; };
C2A754B0219EF62800DF4209 /* batch_norm_16.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */; };
C2A754B1219EF62800DF4209 /* batch_norm_12.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */; };
C2A754B2219EF62800DF4209 /* batch_norm_3.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */; };
C2A754B3219EF62800DF4209 /* conv2d_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */; };
C2A754B4219EF62800DF4209 /* batch_norm_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */; };
C2A754B5219EF62800DF4209 /* batch_norm_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */; };
C2A754B6219EF62800DF4209 /* conv2d_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */; };
C2A754B7219EF62800DF4209 /* batch_norm_2.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */; };
C2A754B8219EF62800DF4209 /* depthwise_conv2d_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */; };
C2A754B9219EF62800DF4209 /* batch_norm_13.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */; };
C2A754BA219EF62800DF4209 /* batch_norm_11.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */; };
C2A754BB219EF62800DF4209 /* depthwise_conv2d_10.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */; };
C2A754BC219EF62800DF4209 /* batch_norm_0.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */; };
C2A754BD219EF62800DF4209 /* conv2d_22.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */; };
C2A754BE219EF62800DF4209 /* conv2d_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */; };
C2A754BF219EF62800DF4209 /* batch_norm_12.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */; };
C2A754C0219EF62800DF4209 /* batch_norm_13.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */; };
C2A754C1219EF62800DF4209 /* conv2d_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */; };
C2A754C2219EF62800DF4209 /* conv2d_23.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */; };
C2A754C3219EF62800DF4209 /* batch_norm_1.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */; };
C2A754C4219EF62800DF4209 /* batch_norm_10.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */; };
C2A754C5219EF62800DF4209 /* depthwise_conv2d_11.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */; };
C2A754C6219EF62800DF4209 /* depthwise_conv2d_3.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */; };
C2A754C7219EF62800DF4209 /* batch_norm_13.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */; };
C2A754C8219EF62800DF4209 /* conv2d_23.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */; };
C2A754C9219EF62800DF4209 /* batch_norm_20.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */; };
C2A754CA219EF62800DF4209 /* batch_norm_34.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */; };
C2A754CB219EF62800DF4209 /* batch_norm_21.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */; };
C2A754CC219EF62800DF4209 /* conv2d_22.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */; };
C2A754CD219EF62800DF4209 /* batch_norm_12.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */; };
C2A754CE219EF62800DF4209 /* depthwise_conv2d_2.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */; };
C2A754CF219EF62800DF4209 /* depthwise_conv2d_0.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */; };
C2A754D0219EF62800DF4209 /* batch_norm_10.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */; };
C2A754D1219EF62800DF4209 /* conv2d_20.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */; };
C2A754D2219EF62800DF4209 /* batch_norm_23.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */; };
C2A754D3219EF62800DF4209 /* batch_norm_22.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */; };
C2A754D4219EF62800DF4209 /* conv2d_21.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */; };
C2A754D5219EF62800DF4209 /* batch_norm_11.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */; };
C2A754D6219EF62800DF4209 /* depthwise_conv2d_1.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */; };
C2A754D7219EF62800DF4209 /* depthwise_conv2d_5.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */; };
C2A754D8219EF62800DF4209 /* batch_norm_8.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */; };
C2A754D9219EF62800DF4209 /* conv2d_25.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */; };
C2A754DA219EF62800DF4209 /* batch_norm_29.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */; };
C2A754DB219EF62800DF4209 /* conv2d_31.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */; };
C2A754DC219EF62800DF4209 /* conv2d_19.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */; };
C2A754DD219EF62800DF4209 /* batch_norm_15.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */; };
C2A754DE219EF62800DF4209 /* batch_norm_32.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */; };
C2A754DF219EF62800DF4209 /* batch_norm_26.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */; };
C2A754E0219EF62800DF4209 /* batch_norm_27.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */; };
C2A754E1219EF62800DF4209 /* batch_norm_33.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */; };
C2A754E2219EF62800DF4209 /* conv2d_18.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75405219EF62700DF4209 /* conv2d_18.w_0 */; };
C2A754E3219EF62800DF4209 /* batch_norm_14.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */; };
C2A754E4219EF62800DF4209 /* conv2d_30.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75407219EF62700DF4209 /* conv2d_30.w_0 */; };
C2A754E5219EF62800DF4209 /* conv2d_24.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75408219EF62700DF4209 /* conv2d_24.w_0 */; };
C2A754E6219EF62800DF4209 /* batch_norm_28.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */; };
C2A754E7219EF62800DF4209 /* batch_norm_9.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */; };
C2A754E8219EF62800DF4209 /* depthwise_conv2d_4.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */; };
C2A754E9219EF62800DF4209 /* depthwise_conv2d_6.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */; };
C2A754EA219EF62800DF4209 /* conv2d_32.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */; };
C2A754EB219EF62800DF4209 /* conv2d_26.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */; };
C2A754EC219EF62800DF4209 /* batch_norm_16.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */; };
C2A754ED219EF62800DF4209 /* batch_norm_19.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */; };
C2A754EE219EF62800DF4209 /* batch_norm_25.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */; };
C2A754EF219EF62800DF4209 /* batch_norm_31.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */; };
C2A754F0219EF62800DF4209 /* batch_norm_8.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */; };
C2A754F1219EF62800DF4209 /* batch_norm_9.w_1 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */; };
C2A754F2219EF62800DF4209 /* batch_norm_30.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */; };
C2A754F3219EF62800DF4209 /* batch_norm_24.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */; };
C2A754F4219EF62800DF4209 /* batch_norm_18.w_2 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */; };
C2A754F5219EF62800DF4209 /* batch_norm_17.b_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */; };
C2A754F6219EF62800DF4209 /* conv2d_27.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A75419219EF62700DF4209 /* conv2d_27.w_0 */; };
C2A754F7219EF62800DF4209 /* conv2d_33.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */; };
C2A754F8219EF62800DF4209 /* depthwise_conv2d_7.w_0 in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */; };
C2A754F9219EF62800DF4209 /* ar_model in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541D219EF62700DF4209 /* ar_model */; };
C2A754FA219EF62800DF4209 /* ar_params in Resources */ = {isa = PBXBuildFile; fileRef = C2A7541E219EF62700DF4209 /* ar_params */; };
C2CBB49021B778EA0020DC6C /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4FD97B2140EE250073E130 /* libc++.tbd */; };
C2E33ADE217EB80E0097FDD6 /* synset.txt in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FB217EB80E0097FDD6 /* synset.txt */; };
C2E33ADF217EB80E0097FDD6 /* banana.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FC217EB80E0097FDD6 /* banana.jpeg */; };
C2E33AE0217EB80E0097FDD6 /* hand.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FD217EB80E0097FDD6 /* hand.jpg */; };
C2E33AE1217EB80E0097FDD6 /* iphone.JPG in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FE217EB80E0097FDD6 /* iphone.JPG */; };
C2E33AE2217EB80E0097FDD6 /* paddle-mobile.png in Resources */ = {isa = PBXBuildFile; fileRef = C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */; };
C2E67E5E21524E460013F575 /* LoadPointerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2E67E5D21524E460013F575 /* LoadPointerViewController.m */; };
FC013928210204A3008100E3 /* PreProcessKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC013927210204A3008100E3 /* PreProcessKernel.metal */; };
FC039B8220E11C550081E9F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC039B8120E11C550081E9F8 /* AppDelegate.swift */; };
......@@ -21,16 +247,6 @@
FCEBEC2C20E1391F00C0B14D /* paddle_mobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */; };
FCEBEC2D20E1391F00C0B14D /* paddle_mobile.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FCF437E8214B6DDB00943429 /* MultiPredictViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF437E7214B6DDB00943429 /* MultiPredictViewController.swift */; };
FCFE9B692152858600DECA15 /* hand.jpg.zip in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B632152858600DECA15 /* hand.jpg.zip */; };
FCFE9B6A2152858600DECA15 /* synset.txt in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B642152858600DECA15 /* synset.txt */; };
FCFE9B6B2152858600DECA15 /* banana.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B652152858600DECA15 /* banana.jpeg */; };
FCFE9B6C2152858600DECA15 /* hand.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B662152858600DECA15 /* hand.jpg */; };
FCFE9B6D2152858600DECA15 /* iphone.JPG in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B672152858600DECA15 /* iphone.JPG */; };
FCFE9B6E2152858600DECA15 /* paddle-mobile.png in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B682152858600DECA15 /* paddle-mobile.png */; };
FCFE9C512152859600DECA15 /* genet_params in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B752152859500DECA15 /* genet_params */; };
FCFE9C522152859600DECA15 /* genet_model in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9B762152859500DECA15 /* genet_model */; };
FCFE9D232152859600DECA15 /* ar_model in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9C4C2152859500DECA15 /* ar_model */; };
FCFE9D242152859600DECA15 /* ar_params in Resources */ = {isa = PBXBuildFile; fileRef = FCFE9C4D2152859500DECA15 /* ar_params */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -51,6 +267,231 @@
081C9CF10DB06C58B8B6B039 /* Pods-paddle-mobile-demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile-demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile-demo/Pods-paddle-mobile-demo.release.xcconfig"; sourceTree = "<group>"; };
18896810981724F8A0FED62A /* Pods_paddle_mobile_demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_paddle_mobile_demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
878829884E1A14D7044721D5 /* Pods-paddle-mobile-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile-demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile-demo/Pods-paddle-mobile-demo.debug.xcconfig"; sourceTree = "<group>"; };
C2A75339219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = "<group>"; };
C2A7533A219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = "<group>"; };
C2A7533D219EF62700DF4209 /* combined_mobilenet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = combined_mobilenet_params; sourceTree = "<group>"; };
C2A7533E219EF62700DF4209 /* combined_mobilenet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = combined_mobilenet_model; sourceTree = "<group>"; };
C2A75340219EF62700DF4209 /* yolo_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = yolo_params; sourceTree = "<group>"; };
C2A75341219EF62700DF4209 /* yolo_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = yolo_model; sourceTree = "<group>"; };
C2A75343219EF62700DF4209 /* genet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_params; sourceTree = "<group>"; };
C2A75344219EF62700DF4209 /* genet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_model; sourceTree = "<group>"; };
C2A75346219EF62700DF4209 /* superresoltion_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = superresoltion_params; sourceTree = "<group>"; };
C2A75347219EF62700DF4209 /* superresoltion_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = superresoltion_model; sourceTree = "<group>"; };
C2A75349219EF62700DF4209 /* ssd_hand_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ssd_hand_params; sourceTree = "<group>"; };
C2A7534A219EF62700DF4209 /* ssd_hand_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ssd_hand_model; sourceTree = "<group>"; };
C2A7534C219EF62700DF4209 /* mobilenet */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mobilenet; sourceTree = "<group>"; };
C2A7534D219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = "<group>"; };
C2A7534E219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = "<group>"; };
C2A7534F219EF62700DF4209 /* yolo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = yolo; sourceTree = "<group>"; };
C2A75351219EF62700DF4209 /* params */ = {isa = PBXFileReference; lastKnownFileType = file; path = params; sourceTree = "<group>"; };
C2A75352219EF62700DF4209 /* model */ = {isa = PBXFileReference; lastKnownFileType = file; path = model; sourceTree = "<group>"; };
C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_0; sourceTree = "<group>"; };
C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.b_0; sourceTree = "<group>"; };
C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.b_0; sourceTree = "<group>"; };
C2A75357219EF62700DF4209 /* conv2d_16.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_16.w_0; sourceTree = "<group>"; };
C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_2; sourceTree = "<group>"; };
C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_2; sourceTree = "<group>"; };
C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_1; sourceTree = "<group>"; };
C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_1; sourceTree = "<group>"; };
C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_2; sourceTree = "<group>"; };
C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_2; sourceTree = "<group>"; };
C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_17.w_0; sourceTree = "<group>"; };
C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.b_0; sourceTree = "<group>"; };
C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.b_0; sourceTree = "<group>"; };
C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_0; sourceTree = "<group>"; };
C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_0; sourceTree = "<group>"; };
C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_9.w_0; sourceTree = "<group>"; };
C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.b_0; sourceTree = "<group>"; };
C2A75365219EF62700DF4209 /* conv2d_29.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_29.w_0; sourceTree = "<group>"; };
C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.b_0; sourceTree = "<group>"; };
C2A75367219EF62700DF4209 /* conv2d_15.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_15.w_0; sourceTree = "<group>"; };
C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.b_0; sourceTree = "<group>"; };
C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_2; sourceTree = "<group>"; };
C2A7536A219EF62700DF4209 /* __model__ */ = {isa = PBXFileReference; lastKnownFileType = file; path = __model__; sourceTree = "<group>"; };
C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_1; sourceTree = "<group>"; };
C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_1; sourceTree = "<group>"; };
C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_2; sourceTree = "<group>"; };
C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_14.w_0; sourceTree = "<group>"; };
C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.b_0; sourceTree = "<group>"; };
C2A75370219EF62700DF4209 /* conv2d_28.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_28.w_0; sourceTree = "<group>"; };
C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.b_0; sourceTree = "<group>"; };
C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.b_0; sourceTree = "<group>"; };
C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_8.w_0; sourceTree = "<group>"; };
C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_0; sourceTree = "<group>"; };
C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_0; sourceTree = "<group>"; };
C2A75376219EF62700DF4209 /* conv2d_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_10.w_0; sourceTree = "<group>"; };
C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.b_0; sourceTree = "<group>"; };
C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.b_0; sourceTree = "<group>"; };
C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_2; sourceTree = "<group>"; };
C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_1; sourceTree = "<group>"; };
C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_1; sourceTree = "<group>"; };
C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_2; sourceTree = "<group>"; };
C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.b_0; sourceTree = "<group>"; };
C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_11.w_0; sourceTree = "<group>"; };
C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_0; sourceTree = "<group>"; };
C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_0; sourceTree = "<group>"; };
C2A75381219EF62700DF4209 /* conv2d_13.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_13.w_0; sourceTree = "<group>"; };
C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.b_0; sourceTree = "<group>"; };
C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_2; sourceTree = "<group>"; };
C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_1; sourceTree = "<group>"; };
C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_1; sourceTree = "<group>"; };
C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_2; sourceTree = "<group>"; };
C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.b_0; sourceTree = "<group>"; };
C2A75388219EF62700DF4209 /* conv2d_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_12.w_0; sourceTree = "<group>"; };
C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_0; sourceTree = "<group>"; };
C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_1; sourceTree = "<group>"; };
C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.b_0; sourceTree = "<group>"; };
C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_0; sourceTree = "<group>"; };
C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_0; sourceTree = "<group>"; };
C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.b_0; sourceTree = "<group>"; };
C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_1; sourceTree = "<group>"; };
C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_1; sourceTree = "<group>"; };
C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_1; sourceTree = "<group>"; };
C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.b_0; sourceTree = "<group>"; };
C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_0; sourceTree = "<group>"; };
C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_0; sourceTree = "<group>"; };
C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_0; sourceTree = "<group>"; };
C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.b_0; sourceTree = "<group>"; };
C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_1; sourceTree = "<group>"; };
C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_1; sourceTree = "<group>"; };
C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_1; sourceTree = "<group>"; };
C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.b_0; sourceTree = "<group>"; };
C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_0; sourceTree = "<group>"; };
C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_0; sourceTree = "<group>"; };
C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_0; sourceTree = "<group>"; };
C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_28.b_0; sourceTree = "<group>"; };
C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_0; sourceTree = "<group>"; };
C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_29.b_0; sourceTree = "<group>"; };
C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_0; sourceTree = "<group>"; };
C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_0; sourceTree = "<group>"; };
C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.b_0; sourceTree = "<group>"; };
C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_1; sourceTree = "<group>"; };
C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_1; sourceTree = "<group>"; };
C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_1; sourceTree = "<group>"; };
C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_1; sourceTree = "<group>"; };
C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_1; sourceTree = "<group>"; };
C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.b_0; sourceTree = "<group>"; };
C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_2; sourceTree = "<group>"; };
C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_8.w_0; sourceTree = "<group>"; };
C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_0; sourceTree = "<group>"; };
C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_0; sourceTree = "<group>"; };
C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_0; sourceTree = "<group>"; };
C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_9.w_0; sourceTree = "<group>"; };
C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_0; sourceTree = "<group>"; };
C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_2; sourceTree = "<group>"; };
C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.b_0; sourceTree = "<group>"; };
C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_1; sourceTree = "<group>"; };
C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_1; sourceTree = "<group>"; };
C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_1; sourceTree = "<group>"; };
C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_1; sourceTree = "<group>"; };
C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_1; sourceTree = "<group>"; };
C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_5.w_2; sourceTree = "<group>"; };
C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_0; sourceTree = "<group>"; };
C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_33.b_0; sourceTree = "<group>"; };
C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_27.b_0; sourceTree = "<group>"; };
C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_4.w_0; sourceTree = "<group>"; };
C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_5.w_0; sourceTree = "<group>"; };
C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_26.b_0; sourceTree = "<group>"; };
C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_32.b_0; sourceTree = "<group>"; };
C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_0; sourceTree = "<group>"; };
C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_4.w_2; sourceTree = "<group>"; };
C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_1; sourceTree = "<group>"; };
C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_1; sourceTree = "<group>"; };
C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.w_1; sourceTree = "<group>"; };
C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.b_0; sourceTree = "<group>"; };
C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_6.w_2; sourceTree = "<group>"; };
C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.w_0; sourceTree = "<group>"; };
C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.w_0; sourceTree = "<group>"; };
C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_24.b_0; sourceTree = "<group>"; };
C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_7.w_0; sourceTree = "<group>"; };
C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_30.b_0; sourceTree = "<group>"; };
C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_31.b_0; sourceTree = "<group>"; };
C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.w_0; sourceTree = "<group>"; };
C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_6.w_0; sourceTree = "<group>"; };
C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_25.b_0; sourceTree = "<group>"; };
C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.w_0; sourceTree = "<group>"; };
C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_7.w_2; sourceTree = "<group>"; };
C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.b_0; sourceTree = "<group>"; };
C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.w_1; sourceTree = "<group>"; };
C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_1; sourceTree = "<group>"; };
C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_3.w_2; sourceTree = "<group>"; };
C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_2.w_0; sourceTree = "<group>"; };
C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_0; sourceTree = "<group>"; };
C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_0; sourceTree = "<group>"; };
C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_3.w_0; sourceTree = "<group>"; };
C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_2.w_2; sourceTree = "<group>"; };
C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_12.w_0; sourceTree = "<group>"; };
C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_1; sourceTree = "<group>"; };
C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.w_1; sourceTree = "<group>"; };
C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_10.w_0; sourceTree = "<group>"; };
C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_0.w_2; sourceTree = "<group>"; };
C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_22.b_0; sourceTree = "<group>"; };
C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_1.w_0; sourceTree = "<group>"; };
C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.w_0; sourceTree = "<group>"; };
C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.w_0; sourceTree = "<group>"; };
C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_0.w_0; sourceTree = "<group>"; };
C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_23.b_0; sourceTree = "<group>"; };
C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_1.w_2; sourceTree = "<group>"; };
C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.w_1; sourceTree = "<group>"; };
C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_11.w_0; sourceTree = "<group>"; };
C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_3.w_0; sourceTree = "<group>"; };
C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_13.b_0; sourceTree = "<group>"; };
C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_23.w_0; sourceTree = "<group>"; };
C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_20.w_2; sourceTree = "<group>"; };
C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_34.w_2; sourceTree = "<group>"; };
C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_21.w_2; sourceTree = "<group>"; };
C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_22.w_0; sourceTree = "<group>"; };
C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_12.b_0; sourceTree = "<group>"; };
C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_2.w_0; sourceTree = "<group>"; };
C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_0.w_0; sourceTree = "<group>"; };
C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_10.b_0; sourceTree = "<group>"; };
C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_20.w_0; sourceTree = "<group>"; };
C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_23.w_2; sourceTree = "<group>"; };
C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_22.w_2; sourceTree = "<group>"; };
C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_21.w_0; sourceTree = "<group>"; };
C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_11.b_0; sourceTree = "<group>"; };
C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_1.w_0; sourceTree = "<group>"; };
C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_5.w_0; sourceTree = "<group>"; };
C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_0; sourceTree = "<group>"; };
C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_25.w_0; sourceTree = "<group>"; };
C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_29.b_0; sourceTree = "<group>"; };
C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_31.w_0; sourceTree = "<group>"; };
C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_19.w_0; sourceTree = "<group>"; };
C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_15.b_0; sourceTree = "<group>"; };
C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_32.w_2; sourceTree = "<group>"; };
C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_26.w_2; sourceTree = "<group>"; };
C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_27.w_2; sourceTree = "<group>"; };
C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_33.w_2; sourceTree = "<group>"; };
C2A75405219EF62700DF4209 /* conv2d_18.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_18.w_0; sourceTree = "<group>"; };
C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_14.b_0; sourceTree = "<group>"; };
C2A75407219EF62700DF4209 /* conv2d_30.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_30.w_0; sourceTree = "<group>"; };
C2A75408219EF62700DF4209 /* conv2d_24.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_24.w_0; sourceTree = "<group>"; };
C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_28.b_0; sourceTree = "<group>"; };
C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_0; sourceTree = "<group>"; };
C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_4.w_0; sourceTree = "<group>"; };
C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_6.w_0; sourceTree = "<group>"; };
C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_32.w_0; sourceTree = "<group>"; };
C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_26.w_0; sourceTree = "<group>"; };
C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_16.b_0; sourceTree = "<group>"; };
C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_19.w_2; sourceTree = "<group>"; };
C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_25.w_2; sourceTree = "<group>"; };
C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_31.w_2; sourceTree = "<group>"; };
C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_8.w_1; sourceTree = "<group>"; };
C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_9.w_1; sourceTree = "<group>"; };
C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_30.w_2; sourceTree = "<group>"; };
C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_24.w_2; sourceTree = "<group>"; };
C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_18.w_2; sourceTree = "<group>"; };
C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = batch_norm_17.b_0; sourceTree = "<group>"; };
C2A75419219EF62700DF4209 /* conv2d_27.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_27.w_0; sourceTree = "<group>"; };
C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = conv2d_33.w_0; sourceTree = "<group>"; };
C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */ = {isa = PBXFileReference; lastKnownFileType = file; path = depthwise_conv2d_7.w_0; sourceTree = "<group>"; };
C2A7541D219EF62700DF4209 /* ar_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_model; sourceTree = "<group>"; };
C2A7541E219EF62700DF4209 /* ar_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_params; sourceTree = "<group>"; };
C2E339FB217EB80E0097FDD6 /* synset.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = synset.txt; sourceTree = "<group>"; };
C2E339FC217EB80E0097FDD6 /* banana.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = banana.jpeg; sourceTree = "<group>"; };
C2E339FD217EB80E0097FDD6 /* hand.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = hand.jpg; sourceTree = "<group>"; };
C2E339FE217EB80E0097FDD6 /* iphone.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = iphone.JPG; sourceTree = "<group>"; };
C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "paddle-mobile.png"; sourceTree = "<group>"; };
C2E67E5C21524E460013F575 /* LoadPointerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadPointerViewController.h; sourceTree = "<group>"; };
C2E67E5D21524E460013F575 /* LoadPointerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadPointerViewController.m; sourceTree = "<group>"; };
FC013927210204A3008100E3 /* PreProcessKernel.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = PreProcessKernel.metal; sourceTree = "<group>"; };
......@@ -68,16 +509,6 @@
FCBCCC542122EF5400D94F7E /* MetalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetalHelper.swift; sourceTree = "<group>"; };
FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = paddle_mobile.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FCF437E7214B6DDB00943429 /* MultiPredictViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiPredictViewController.swift; sourceTree = "<group>"; };
FCFE9B632152858600DECA15 /* hand.jpg.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = hand.jpg.zip; sourceTree = "<group>"; };
FCFE9B642152858600DECA15 /* synset.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = synset.txt; sourceTree = "<group>"; };
FCFE9B652152858600DECA15 /* banana.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = banana.jpeg; sourceTree = "<group>"; };
FCFE9B662152858600DECA15 /* hand.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = hand.jpg; sourceTree = "<group>"; };
FCFE9B672152858600DECA15 /* iphone.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = iphone.JPG; sourceTree = "<group>"; };
FCFE9B682152858600DECA15 /* paddle-mobile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "paddle-mobile.png"; sourceTree = "<group>"; };
FCFE9B752152859500DECA15 /* genet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_params; sourceTree = "<group>"; };
FCFE9B762152859500DECA15 /* genet_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = genet_model; sourceTree = "<group>"; };
FCFE9C4C2152859500DECA15 /* ar_model */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_model; sourceTree = "<group>"; };
FCFE9C4D2152859500DECA15 /* ar_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = ar_params; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -85,6 +516,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C2CBB49021B778EA0020DC6C /* libc++.tbd in Frameworks */,
FCEBEC2C20E1391F00C0B14D /* paddle_mobile.framework in Frameworks */,
30D0ED21F392CFA3885B1002 /* Pods_paddle_mobile_demo.framework in Frameworks */,
);
......@@ -111,6 +543,333 @@
name = Frameworks;
sourceTree = "<group>";
};
C2A75337219EF62700DF4209 /* models */ = {
isa = PBXGroup;
children = (
C2A75338219EF62700DF4209 /* mobilenet */,
C2A7533B219EF62700DF4209 /* yolo_combined */,
C2A75342219EF62700DF4209 /* genet */,
C2A75345219EF62700DF4209 /* superresoltion */,
C2A75348219EF62700DF4209 /* mobilenet_ssd_hand */,
C2A7534B219EF62700DF4209 /* yolo */,
C2A75350219EF62700DF4209 /* mobilenet_combine */,
C2A75353219EF62700DF4209 /* mobilenetssd */,
C2A7541C219EF62700DF4209 /* fluid_fssd_new_ar */,
);
path = models;
sourceTree = "<group>";
};
C2A75338219EF62700DF4209 /* mobilenet */ = {
isa = PBXGroup;
children = (
C2A75339219EF62700DF4209 /* params */,
C2A7533A219EF62700DF4209 /* model */,
);
path = mobilenet;
sourceTree = "<group>";
};
C2A7533B219EF62700DF4209 /* yolo_combined */ = {
isa = PBXGroup;
children = (
C2A7533C219EF62700DF4209 /* mobilenet */,
C2A7533F219EF62700DF4209 /* yolo */,
);
path = yolo_combined;
sourceTree = "<group>";
};
C2A7533C219EF62700DF4209 /* mobilenet */ = {
isa = PBXGroup;
children = (
C2A7533D219EF62700DF4209 /* combined_mobilenet_params */,
C2A7533E219EF62700DF4209 /* combined_mobilenet_model */,
);
path = mobilenet;
sourceTree = "<group>";
};
C2A7533F219EF62700DF4209 /* yolo */ = {
isa = PBXGroup;
children = (
C2A75340219EF62700DF4209 /* yolo_params */,
C2A75341219EF62700DF4209 /* yolo_model */,
);
path = yolo;
sourceTree = "<group>";
};
C2A75342219EF62700DF4209 /* genet */ = {
isa = PBXGroup;
children = (
C2A75343219EF62700DF4209 /* genet_params */,
C2A75344219EF62700DF4209 /* genet_model */,
);
path = genet;
sourceTree = "<group>";
};
C2A75345219EF62700DF4209 /* superresoltion */ = {
isa = PBXGroup;
children = (
C2A75346219EF62700DF4209 /* superresoltion_params */,
C2A75347219EF62700DF4209 /* superresoltion_model */,
);
path = superresoltion;
sourceTree = "<group>";
};
C2A75348219EF62700DF4209 /* mobilenet_ssd_hand */ = {
isa = PBXGroup;
children = (
C2A75349219EF62700DF4209 /* ssd_hand_params */,
C2A7534A219EF62700DF4209 /* ssd_hand_model */,
);
path = mobilenet_ssd_hand;
sourceTree = "<group>";
};
C2A7534B219EF62700DF4209 /* yolo */ = {
isa = PBXGroup;
children = (
C2A7534C219EF62700DF4209 /* mobilenet */,
C2A7534D219EF62700DF4209 /* params */,
C2A7534E219EF62700DF4209 /* model */,
C2A7534F219EF62700DF4209 /* yolo */,
);
path = yolo;
sourceTree = "<group>";
};
C2A75350219EF62700DF4209 /* mobilenet_combine */ = {
isa = PBXGroup;
children = (
C2A75351219EF62700DF4209 /* params */,
C2A75352219EF62700DF4209 /* model */,
);
path = mobilenet_combine;
sourceTree = "<group>";
};
C2A75353219EF62700DF4209 /* mobilenetssd */ = {
isa = PBXGroup;
children = (
C2A75354219EF62700DF4209 /* batch_norm_7.w_0 */,
C2A75355219EF62700DF4209 /* batch_norm_26.b_0 */,
C2A75356219EF62700DF4209 /* batch_norm_32.b_0 */,
C2A75357219EF62700DF4209 /* conv2d_16.w_0 */,
C2A75358219EF62700DF4209 /* batch_norm_15.w_2 */,
C2A75359219EF62700DF4209 /* batch_norm_29.w_2 */,
C2A7535A219EF62700DF4209 /* batch_norm_4.w_1 */,
C2A7535B219EF62700DF4209 /* batch_norm_5.w_1 */,
C2A7535C219EF62700DF4209 /* batch_norm_28.w_2 */,
C2A7535D219EF62700DF4209 /* batch_norm_14.w_2 */,
C2A7535E219EF62700DF4209 /* conv2d_17.w_0 */,
C2A7535F219EF62700DF4209 /* batch_norm_33.b_0 */,
C2A75360219EF62700DF4209 /* batch_norm_27.b_0 */,
C2A75361219EF62700DF4209 /* batch_norm_6.w_0 */,
C2A75362219EF62700DF4209 /* batch_norm_4.w_0 */,
C2A75363219EF62700DF4209 /* depthwise_conv2d_9.w_0 */,
C2A75364219EF62700DF4209 /* batch_norm_31.b_0 */,
C2A75365219EF62700DF4209 /* conv2d_29.w_0 */,
C2A75366219EF62700DF4209 /* batch_norm_25.b_0 */,
C2A75367219EF62700DF4209 /* conv2d_15.w_0 */,
C2A75368219EF62700DF4209 /* batch_norm_19.b_0 */,
C2A75369219EF62700DF4209 /* batch_norm_16.w_2 */,
C2A7536A219EF62700DF4209 /* __model__ */,
C2A7536B219EF62700DF4209 /* batch_norm_7.w_1 */,
C2A7536C219EF62700DF4209 /* batch_norm_6.w_1 */,
C2A7536D219EF62700DF4209 /* batch_norm_17.w_2 */,
C2A7536E219EF62700DF4209 /* conv2d_14.w_0 */,
C2A7536F219EF62700DF4209 /* batch_norm_18.b_0 */,
C2A75370219EF62700DF4209 /* conv2d_28.w_0 */,
C2A75371219EF62700DF4209 /* batch_norm_24.b_0 */,
C2A75372219EF62700DF4209 /* batch_norm_30.b_0 */,
C2A75373219EF62700DF4209 /* depthwise_conv2d_8.w_0 */,
C2A75374219EF62700DF4209 /* batch_norm_5.w_0 */,
C2A75375219EF62700DF4209 /* batch_norm_1.w_0 */,
C2A75376219EF62700DF4209 /* conv2d_10.w_0 */,
C2A75377219EF62700DF4209 /* batch_norm_34.b_0 */,
C2A75378219EF62700DF4209 /* batch_norm_20.b_0 */,
C2A75379219EF62700DF4209 /* batch_norm_13.w_2 */,
C2A7537A219EF62700DF4209 /* batch_norm_2.w_1 */,
C2A7537B219EF62700DF4209 /* batch_norm_3.w_1 */,
C2A7537C219EF62700DF4209 /* batch_norm_12.w_2 */,
C2A7537D219EF62700DF4209 /* batch_norm_21.b_0 */,
C2A7537E219EF62700DF4209 /* conv2d_11.w_0 */,
C2A7537F219EF62700DF4209 /* batch_norm_0.w_0 */,
C2A75380219EF62700DF4209 /* batch_norm_2.w_0 */,
C2A75381219EF62700DF4209 /* conv2d_13.w_0 */,
C2A75382219EF62700DF4209 /* batch_norm_23.b_0 */,
C2A75383219EF62700DF4209 /* batch_norm_10.w_2 */,
C2A75384219EF62700DF4209 /* batch_norm_1.w_1 */,
C2A75385219EF62700DF4209 /* batch_norm_0.w_1 */,
C2A75386219EF62700DF4209 /* batch_norm_11.w_2 */,
C2A75387219EF62700DF4209 /* batch_norm_22.b_0 */,
C2A75388219EF62700DF4209 /* conv2d_12.w_0 */,
C2A75389219EF62700DF4209 /* batch_norm_3.w_0 */,
C2A7538A219EF62700DF4209 /* batch_norm_21.w_1 */,
C2A7538B219EF62700DF4209 /* batch_norm_3.b_0 */,
C2A7538C219EF62700DF4209 /* batch_norm_22.w_0 */,
C2A7538D219EF62700DF4209 /* batch_norm_23.w_0 */,
C2A7538E219EF62700DF4209 /* batch_norm_2.b_0 */,
C2A7538F219EF62700DF4209 /* batch_norm_20.w_1 */,
C2A75390219EF62700DF4209 /* batch_norm_34.w_1 */,
C2A75391219EF62700DF4209 /* batch_norm_22.w_1 */,
C2A75392219EF62700DF4209 /* batch_norm_0.b_0 */,
C2A75393219EF62700DF4209 /* batch_norm_21.w_0 */,
C2A75394219EF62700DF4209 /* batch_norm_20.w_0 */,
C2A75395219EF62700DF4209 /* batch_norm_34.w_0 */,
C2A75396219EF62700DF4209 /* batch_norm_1.b_0 */,
C2A75397219EF62700DF4209 /* batch_norm_23.w_1 */,
C2A75398219EF62700DF4209 /* batch_norm_27.w_1 */,
C2A75399219EF62700DF4209 /* batch_norm_33.w_1 */,
C2A7539A219EF62700DF4209 /* batch_norm_5.b_0 */,
C2A7539B219EF62700DF4209 /* batch_norm_18.w_0 */,
C2A7539C219EF62700DF4209 /* batch_norm_30.w_0 */,
C2A7539D219EF62700DF4209 /* batch_norm_24.w_0 */,
C2A7539E219EF62700DF4209 /* conv2d_28.b_0 */,
C2A7539F219EF62700DF4209 /* batch_norm_25.w_0 */,
C2A753A0219EF62700DF4209 /* conv2d_29.b_0 */,
C2A753A1219EF62700DF4209 /* batch_norm_31.w_0 */,
C2A753A2219EF62700DF4209 /* batch_norm_19.w_0 */,
C2A753A3219EF62700DF4209 /* batch_norm_4.b_0 */,
C2A753A4219EF62700DF4209 /* batch_norm_32.w_1 */,
C2A753A5219EF62700DF4209 /* batch_norm_26.w_1 */,
C2A753A6219EF62700DF4209 /* batch_norm_30.w_1 */,
C2A753A7219EF62700DF4209 /* batch_norm_24.w_1 */,
C2A753A8219EF62700DF4209 /* batch_norm_18.w_1 */,
C2A753A9219EF62700DF4209 /* batch_norm_6.b_0 */,
C2A753AA219EF62700DF4209 /* batch_norm_9.w_2 */,
C2A753AB219EF62700DF4209 /* conv2d_8.w_0 */,
C2A753AC219EF62700DF4209 /* batch_norm_27.w_0 */,
C2A753AD219EF62700DF4209 /* batch_norm_33.w_0 */,
C2A753AE219EF62700DF4209 /* batch_norm_32.w_0 */,
C2A753AF219EF62700DF4209 /* conv2d_9.w_0 */,
C2A753B0219EF62700DF4209 /* batch_norm_26.w_0 */,
C2A753B1219EF62700DF4209 /* batch_norm_8.w_2 */,
C2A753B2219EF62700DF4209 /* batch_norm_7.b_0 */,
C2A753B3219EF62700DF4209 /* batch_norm_19.w_1 */,
C2A753B4219EF62700DF4209 /* batch_norm_25.w_1 */,
C2A753B5219EF62700DF4209 /* batch_norm_31.w_1 */,
C2A753B6219EF62700DF4209 /* batch_norm_28.w_1 */,
C2A753B7219EF62700DF4209 /* batch_norm_14.w_1 */,
C2A753B8219EF62700DF4209 /* batch_norm_5.w_2 */,
C2A753B9219EF62700DF4209 /* batch_norm_17.w_0 */,
C2A753BA219EF62700DF4209 /* conv2d_33.b_0 */,
C2A753BB219EF62700DF4209 /* conv2d_27.b_0 */,
C2A753BC219EF62700DF4209 /* conv2d_4.w_0 */,
C2A753BD219EF62700DF4209 /* conv2d_5.w_0 */,
C2A753BE219EF62700DF4209 /* conv2d_26.b_0 */,
C2A753BF219EF62700DF4209 /* conv2d_32.b_0 */,
C2A753C0219EF62700DF4209 /* batch_norm_16.w_0 */,
C2A753C1219EF62700DF4209 /* batch_norm_4.w_2 */,
C2A753C2219EF62700DF4209 /* batch_norm_15.w_1 */,
C2A753C3219EF62700DF4209 /* batch_norm_29.w_1 */,
C2A753C4219EF62700DF4209 /* batch_norm_17.w_1 */,
C2A753C5219EF62700DF4209 /* batch_norm_9.b_0 */,
C2A753C6219EF62700DF4209 /* batch_norm_6.w_2 */,
C2A753C7219EF62700DF4209 /* batch_norm_14.w_0 */,
C2A753C8219EF62700DF4209 /* batch_norm_28.w_0 */,
C2A753C9219EF62700DF4209 /* conv2d_24.b_0 */,
C2A753CA219EF62700DF4209 /* conv2d_7.w_0 */,
C2A753CB219EF62700DF4209 /* conv2d_30.b_0 */,
C2A753CC219EF62700DF4209 /* conv2d_31.b_0 */,
C2A753CD219EF62700DF4209 /* batch_norm_29.w_0 */,
C2A753CE219EF62700DF4209 /* conv2d_6.w_0 */,
C2A753CF219EF62700DF4209 /* conv2d_25.b_0 */,
C2A753D0219EF62700DF4209 /* batch_norm_15.w_0 */,
C2A753D1219EF62700DF4209 /* batch_norm_7.w_2 */,
C2A753D2219EF62700DF4209 /* batch_norm_8.b_0 */,
C2A753D3219EF62700DF4209 /* batch_norm_16.w_1 */,
C2A753D4219EF62700DF4209 /* batch_norm_12.w_1 */,
C2A753D5219EF62700DF4209 /* batch_norm_3.w_2 */,
C2A753D6219EF62700DF4209 /* conv2d_2.w_0 */,
C2A753D7219EF62700DF4209 /* batch_norm_11.w_0 */,
C2A753D8219EF62700DF4209 /* batch_norm_10.w_0 */,
C2A753D9219EF62700DF4209 /* conv2d_3.w_0 */,
C2A753DA219EF62700DF4209 /* batch_norm_2.w_2 */,
C2A753DB219EF62700DF4209 /* depthwise_conv2d_12.w_0 */,
C2A753DC219EF62700DF4209 /* batch_norm_13.w_1 */,
C2A753DD219EF62700DF4209 /* batch_norm_11.w_1 */,
C2A753DE219EF62700DF4209 /* depthwise_conv2d_10.w_0 */,
C2A753DF219EF62700DF4209 /* batch_norm_0.w_2 */,
C2A753E0219EF62700DF4209 /* conv2d_22.b_0 */,
C2A753E1219EF62700DF4209 /* conv2d_1.w_0 */,
C2A753E2219EF62700DF4209 /* batch_norm_12.w_0 */,
C2A753E3219EF62700DF4209 /* batch_norm_13.w_0 */,
C2A753E4219EF62700DF4209 /* conv2d_0.w_0 */,
C2A753E5219EF62700DF4209 /* conv2d_23.b_0 */,
C2A753E6219EF62700DF4209 /* batch_norm_1.w_2 */,
C2A753E7219EF62700DF4209 /* batch_norm_10.w_1 */,
C2A753E8219EF62700DF4209 /* depthwise_conv2d_11.w_0 */,
C2A753E9219EF62700DF4209 /* depthwise_conv2d_3.w_0 */,
C2A753EA219EF62700DF4209 /* batch_norm_13.b_0 */,
C2A753EB219EF62700DF4209 /* conv2d_23.w_0 */,
C2A753EC219EF62700DF4209 /* batch_norm_20.w_2 */,
C2A753ED219EF62700DF4209 /* batch_norm_34.w_2 */,
C2A753EE219EF62700DF4209 /* batch_norm_21.w_2 */,
C2A753EF219EF62700DF4209 /* conv2d_22.w_0 */,
C2A753F0219EF62700DF4209 /* batch_norm_12.b_0 */,
C2A753F1219EF62700DF4209 /* depthwise_conv2d_2.w_0 */,
C2A753F2219EF62700DF4209 /* depthwise_conv2d_0.w_0 */,
C2A753F3219EF62700DF4209 /* batch_norm_10.b_0 */,
C2A753F4219EF62700DF4209 /* conv2d_20.w_0 */,
C2A753F5219EF62700DF4209 /* batch_norm_23.w_2 */,
C2A753F6219EF62700DF4209 /* batch_norm_22.w_2 */,
C2A753F7219EF62700DF4209 /* conv2d_21.w_0 */,
C2A753F8219EF62700DF4209 /* batch_norm_11.b_0 */,
C2A753F9219EF62700DF4209 /* depthwise_conv2d_1.w_0 */,
C2A753FA219EF62700DF4209 /* depthwise_conv2d_5.w_0 */,
C2A753FB219EF62700DF4209 /* batch_norm_8.w_0 */,
C2A753FC219EF62700DF4209 /* conv2d_25.w_0 */,
C2A753FD219EF62700DF4209 /* batch_norm_29.b_0 */,
C2A753FE219EF62700DF4209 /* conv2d_31.w_0 */,
C2A753FF219EF62700DF4209 /* conv2d_19.w_0 */,
C2A75400219EF62700DF4209 /* batch_norm_15.b_0 */,
C2A75401219EF62700DF4209 /* batch_norm_32.w_2 */,
C2A75402219EF62700DF4209 /* batch_norm_26.w_2 */,
C2A75403219EF62700DF4209 /* batch_norm_27.w_2 */,
C2A75404219EF62700DF4209 /* batch_norm_33.w_2 */,
C2A75405219EF62700DF4209 /* conv2d_18.w_0 */,
C2A75406219EF62700DF4209 /* batch_norm_14.b_0 */,
C2A75407219EF62700DF4209 /* conv2d_30.w_0 */,
C2A75408219EF62700DF4209 /* conv2d_24.w_0 */,
C2A75409219EF62700DF4209 /* batch_norm_28.b_0 */,
C2A7540A219EF62700DF4209 /* batch_norm_9.w_0 */,
C2A7540B219EF62700DF4209 /* depthwise_conv2d_4.w_0 */,
C2A7540C219EF62700DF4209 /* depthwise_conv2d_6.w_0 */,
C2A7540D219EF62700DF4209 /* conv2d_32.w_0 */,
C2A7540E219EF62700DF4209 /* conv2d_26.w_0 */,
C2A7540F219EF62700DF4209 /* batch_norm_16.b_0 */,
C2A75410219EF62700DF4209 /* batch_norm_19.w_2 */,
C2A75411219EF62700DF4209 /* batch_norm_25.w_2 */,
C2A75412219EF62700DF4209 /* batch_norm_31.w_2 */,
C2A75413219EF62700DF4209 /* batch_norm_8.w_1 */,
C2A75414219EF62700DF4209 /* batch_norm_9.w_1 */,
C2A75415219EF62700DF4209 /* batch_norm_30.w_2 */,
C2A75416219EF62700DF4209 /* batch_norm_24.w_2 */,
C2A75417219EF62700DF4209 /* batch_norm_18.w_2 */,
C2A75418219EF62700DF4209 /* batch_norm_17.b_0 */,
C2A75419219EF62700DF4209 /* conv2d_27.w_0 */,
C2A7541A219EF62700DF4209 /* conv2d_33.w_0 */,
C2A7541B219EF62700DF4209 /* depthwise_conv2d_7.w_0 */,
);
path = mobilenetssd;
sourceTree = "<group>";
};
C2A7541C219EF62700DF4209 /* fluid_fssd_new_ar */ = {
isa = PBXGroup;
children = (
C2A7541D219EF62700DF4209 /* ar_model */,
C2A7541E219EF62700DF4209 /* ar_params */,
);
path = fluid_fssd_new_ar;
sourceTree = "<group>";
};
C2E339FA217EB80E0097FDD6 /* images */ = {
isa = PBXGroup;
children = (
C2E339FB217EB80E0097FDD6 /* synset.txt */,
C2E339FC217EB80E0097FDD6 /* banana.jpeg */,
C2E339FD217EB80E0097FDD6 /* hand.jpg */,
C2E339FE217EB80E0097FDD6 /* iphone.JPG */,
C2E339FF217EB80E0097FDD6 /* paddle-mobile.png */,
);
path = images;
sourceTree = "<group>";
};
FC039B7520E11C550081E9F8 = {
isa = PBXGroup;
children = (
......@@ -133,8 +892,8 @@
FC039B8020E11C550081E9F8 /* paddle-mobile-demo */ = {
isa = PBXGroup;
children = (
FCFE9B6F2152859500DECA15 /* models */,
FCFE9B622152858600DECA15 /* images */,
C2A75337219EF62700DF4209 /* models */,
C2E339FA217EB80E0097FDD6 /* images */,
FC803BCA214D27920094B8E5 /* VideoCapture */,
FC8CFED2213519540094D569 /* Net */,
FC039B8120E11C550081E9F8 /* AppDelegate.swift */,
......@@ -169,48 +928,6 @@
path = Net;
sourceTree = "<group>";
};
FCFE9B622152858600DECA15 /* images */ = {
isa = PBXGroup;
children = (
FCFE9B632152858600DECA15 /* hand.jpg.zip */,
FCFE9B642152858600DECA15 /* synset.txt */,
FCFE9B652152858600DECA15 /* banana.jpeg */,
FCFE9B662152858600DECA15 /* hand.jpg */,
FCFE9B672152858600DECA15 /* iphone.JPG */,
FCFE9B682152858600DECA15 /* paddle-mobile.png */,
);
name = images;
path = ../../images;
sourceTree = "<group>";
};
FCFE9B6F2152859500DECA15 /* models */ = {
isa = PBXGroup;
children = (
FCFE9B742152859500DECA15 /* genet */,
FCFE9C4B2152859500DECA15 /* fluid_fssd_new_ar */,
);
name = models;
path = ../../models;
sourceTree = "<group>";
};
FCFE9B742152859500DECA15 /* genet */ = {
isa = PBXGroup;
children = (
FCFE9B752152859500DECA15 /* genet_params */,
FCFE9B762152859500DECA15 /* genet_model */,
);
path = genet;
sourceTree = "<group>";
};
FCFE9C4B2152859500DECA15 /* fluid_fssd_new_ar */ = {
isa = PBXGroup;
children = (
FCFE9C4C2152859500DECA15 /* ar_model */,
FCFE9C4D2152859500DECA15 /* ar_params */,
);
path = fluid_fssd_new_ar;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -273,19 +990,234 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FCFE9D232152859600DECA15 /* ar_model in Resources */,
C2A754A5219EF62800DF4209 /* batch_norm_28.w_0 in Resources */,
C2A75435219EF62800DF4209 /* batch_norm_15.w_2 in Resources */,
C2A754B9219EF62800DF4209 /* batch_norm_13.w_1 in Resources */,
C2A75471219EF62800DF4209 /* batch_norm_20.w_0 in Resources */,
C2A754C1219EF62800DF4209 /* conv2d_0.w_0 in Resources */,
C2A754F0219EF62800DF4209 /* batch_norm_8.w_1 in Resources */,
C2A754BE219EF62800DF4209 /* conv2d_1.w_0 in Resources */,
C2A75463219EF62800DF4209 /* batch_norm_11.w_2 in Resources */,
C2A754F5219EF62800DF4209 /* batch_norm_17.b_0 in Resources */,
C2A75465219EF62800DF4209 /* conv2d_12.w_0 in Resources */,
FC039B8C20E11C560081E9F8 /* LaunchScreen.storyboard in Resources */,
FCFE9C522152859600DECA15 /* genet_model in Resources */,
FCFE9D242152859600DECA15 /* ar_params in Resources */,
FCFE9B6E2152858600DECA15 /* paddle-mobile.png in Resources */,
FCFE9C512152859600DECA15 /* genet_params in Resources */,
FCFE9B692152858600DECA15 /* hand.jpg.zip in Resources */,
C2A75494219EF62800DF4209 /* batch_norm_14.w_1 in Resources */,
C2A7547E219EF62800DF4209 /* batch_norm_31.w_0 in Resources */,
C2A75440219EF62800DF4209 /* depthwise_conv2d_9.w_0 in Resources */,
C2A754CC219EF62800DF4209 /* conv2d_22.w_0 in Resources */,
C2A754E7219EF62800DF4209 /* batch_norm_9.w_0 in Resources */,
C2A75438219EF62800DF4209 /* batch_norm_5.w_1 in Resources */,
C2A75481219EF62800DF4209 /* batch_norm_32.w_1 in Resources */,
C2A75424219EF62800DF4209 /* yolo_model in Resources */,
C2A7549D219EF62800DF4209 /* batch_norm_16.w_0 in Resources */,
C2A754D3219EF62800DF4209 /* batch_norm_22.w_2 in Resources */,
C2A754F6219EF62800DF4209 /* conv2d_27.w_0 in Resources */,
C2A75476219EF62800DF4209 /* batch_norm_33.w_1 in Resources */,
C2A754AB219EF62800DF4209 /* conv2d_6.w_0 in Resources */,
C2A75452219EF62800DF4209 /* batch_norm_1.w_0 in Resources */,
C2A7544C219EF62800DF4209 /* batch_norm_18.b_0 in Resources */,
C2A75461219EF62800DF4209 /* batch_norm_1.w_1 in Resources */,
C2A75428219EF62800DF4209 /* superresoltion_model in Resources */,
C2A7545E219EF62800DF4209 /* conv2d_13.w_0 in Resources */,
C2E33ADF217EB80E0097FDD6 /* banana.jpeg in Resources */,
C2A7541F219EF62800DF4209 /* params in Resources */,
C2A75468219EF62800DF4209 /* batch_norm_3.b_0 in Resources */,
C2A75469219EF62800DF4209 /* batch_norm_22.w_0 in Resources */,
C2A75425219EF62800DF4209 /* genet_params in Resources */,
C2A754B0219EF62800DF4209 /* batch_norm_16.w_1 in Resources */,
C2A754AE219EF62800DF4209 /* batch_norm_7.w_2 in Resources */,
C2A754F2219EF62800DF4209 /* batch_norm_30.w_2 in Resources */,
C2A7543D219EF62800DF4209 /* batch_norm_27.b_0 in Resources */,
C2A7547C219EF62800DF4209 /* batch_norm_25.w_0 in Resources */,
C2A754D5219EF62800DF4209 /* batch_norm_11.b_0 in Resources */,
C2A75483219EF62800DF4209 /* batch_norm_30.w_1 in Resources */,
C2A754B6219EF62800DF4209 /* conv2d_3.w_0 in Resources */,
C2A75437219EF62800DF4209 /* batch_norm_4.w_1 in Resources */,
C2A754E5219EF62800DF4209 /* conv2d_24.w_0 in Resources */,
C2A75473219EF62800DF4209 /* batch_norm_1.b_0 in Resources */,
C2A754A6219EF62800DF4209 /* conv2d_24.b_0 in Resources */,
C2A7545F219EF62800DF4209 /* batch_norm_23.b_0 in Resources */,
C2A75482219EF62800DF4209 /* batch_norm_26.w_1 in Resources */,
C2A75427219EF62800DF4209 /* superresoltion_params in Resources */,
C2A7542E219EF62800DF4209 /* yolo in Resources */,
C2A75445219EF62800DF4209 /* batch_norm_19.b_0 in Resources */,
C2A75464219EF62800DF4209 /* batch_norm_22.b_0 in Resources */,
C2A754EF219EF62800DF4209 /* batch_norm_31.w_2 in Resources */,
C2A754F7219EF62800DF4209 /* conv2d_33.w_0 in Resources */,
C2A75421219EF62800DF4209 /* combined_mobilenet_params in Resources */,
C2A754C7219EF62800DF4209 /* batch_norm_13.b_0 in Resources */,
C2A75487219EF62800DF4209 /* batch_norm_9.w_2 in Resources */,
C2A75454219EF62800DF4209 /* batch_norm_34.b_0 in Resources */,
C2A754AF219EF62800DF4209 /* batch_norm_8.b_0 in Resources */,
C2A75480219EF62800DF4209 /* batch_norm_4.b_0 in Resources */,
C2A75479219EF62800DF4209 /* batch_norm_30.w_0 in Resources */,
C2A75470219EF62800DF4209 /* batch_norm_21.w_0 in Resources */,
FC039B8920E11C560081E9F8 /* Assets.xcassets in Resources */,
FCFE9B6A2152858600DECA15 /* synset.txt in Resources */,
FCFE9B6B2152858600DECA15 /* banana.jpeg in Resources */,
FCFE9B6D2152858600DECA15 /* iphone.JPG in Resources */,
FCFE9B6C2152858600DECA15 /* hand.jpg in Resources */,
C2A7549A219EF62800DF4209 /* conv2d_5.w_0 in Resources */,
C2A7542F219EF62800DF4209 /* params in Resources */,
C2A754F4219EF62800DF4209 /* batch_norm_18.w_2 in Resources */,
C2A75496219EF62800DF4209 /* batch_norm_17.w_0 in Resources */,
C2A754D4219EF62800DF4209 /* conv2d_21.w_0 in Resources */,
C2E33AE2217EB80E0097FDD6 /* paddle-mobile.png in Resources */,
C2A754D8219EF62800DF4209 /* batch_norm_8.w_0 in Resources */,
C2A75447219EF62800DF4209 /* __model__ in Resources */,
C2A75432219EF62800DF4209 /* batch_norm_26.b_0 in Resources */,
C2A7547D219EF62800DF4209 /* conv2d_29.b_0 in Resources */,
C2A75436219EF62800DF4209 /* batch_norm_29.w_2 in Resources */,
C2A75497219EF62800DF4209 /* conv2d_33.b_0 in Resources */,
C2A754B5219EF62800DF4209 /* batch_norm_10.w_0 in Resources */,
C2A75493219EF62800DF4209 /* batch_norm_28.w_1 in Resources */,
C2A754A3219EF62800DF4209 /* batch_norm_6.w_2 in Resources */,
C2A754CB219EF62800DF4209 /* batch_norm_21.w_2 in Resources */,
C2E33AE1217EB80E0097FDD6 /* iphone.JPG in Resources */,
C2A754A7219EF62800DF4209 /* conv2d_7.w_0 in Resources */,
C2A754B7219EF62800DF4209 /* batch_norm_2.w_2 in Resources */,
C2A75450219EF62800DF4209 /* depthwise_conv2d_8.w_0 in Resources */,
C2A754ED219EF62800DF4209 /* batch_norm_19.w_2 in Resources */,
C2A75477219EF62800DF4209 /* batch_norm_5.b_0 in Resources */,
C2A754C6219EF62800DF4209 /* depthwise_conv2d_3.w_0 in Resources */,
C2A7542B219EF62800DF4209 /* mobilenet in Resources */,
C2A754C5219EF62800DF4209 /* depthwise_conv2d_11.w_0 in Resources */,
C2A7544A219EF62800DF4209 /* batch_norm_17.w_2 in Resources */,
C2A754E4219EF62800DF4209 /* conv2d_30.w_0 in Resources */,
C2A754AA219EF62800DF4209 /* batch_norm_29.w_0 in Resources */,
C2A754C4219EF62800DF4209 /* batch_norm_10.w_1 in Resources */,
C2A754AC219EF62800DF4209 /* conv2d_25.b_0 in Resources */,
C2A75490219EF62800DF4209 /* batch_norm_19.w_1 in Resources */,
C2A754F8219EF62800DF4209 /* depthwise_conv2d_7.w_0 in Resources */,
C2A754D6219EF62800DF4209 /* depthwise_conv2d_1.w_0 in Resources */,
C2A754B1219EF62800DF4209 /* batch_norm_12.w_1 in Resources */,
C2A75495219EF62800DF4209 /* batch_norm_5.w_2 in Resources */,
C2A75458219EF62800DF4209 /* batch_norm_3.w_1 in Resources */,
C2A7549C219EF62800DF4209 /* conv2d_32.b_0 in Resources */,
C2A754E8219EF62800DF4209 /* depthwise_conv2d_4.w_0 in Resources */,
C2A7548A219EF62800DF4209 /* batch_norm_33.w_0 in Resources */,
C2A75491219EF62800DF4209 /* batch_norm_25.w_1 in Resources */,
C2A75466219EF62800DF4209 /* batch_norm_3.w_0 in Resources */,
C2A75474219EF62800DF4209 /* batch_norm_23.w_1 in Resources */,
C2A7546A219EF62800DF4209 /* batch_norm_23.w_0 in Resources */,
C2A754E3219EF62800DF4209 /* batch_norm_14.b_0 in Resources */,
C2A75429219EF62800DF4209 /* ssd_hand_params in Resources */,
C2A754D7219EF62800DF4209 /* depthwise_conv2d_5.w_0 in Resources */,
C2A754B3219EF62800DF4209 /* conv2d_2.w_0 in Resources */,
C2A7547F219EF62800DF4209 /* batch_norm_19.w_0 in Resources */,
C2A75455219EF62800DF4209 /* batch_norm_20.b_0 in Resources */,
C2A754BC219EF62800DF4209 /* batch_norm_0.w_2 in Resources */,
C2A754BF219EF62800DF4209 /* batch_norm_12.w_0 in Resources */,
C2A7547B219EF62800DF4209 /* conv2d_28.b_0 in Resources */,
C2A7545D219EF62800DF4209 /* batch_norm_2.w_0 in Resources */,
C2A754D1219EF62800DF4209 /* conv2d_20.w_0 in Resources */,
C2A75472219EF62800DF4209 /* batch_norm_34.w_0 in Resources */,
C2A754DF219EF62800DF4209 /* batch_norm_26.w_2 in Resources */,
C2A754D9219EF62800DF4209 /* conv2d_25.w_0 in Resources */,
C2A7543A219EF62800DF4209 /* batch_norm_14.w_2 in Resources */,
C2A75488219EF62800DF4209 /* conv2d_8.w_0 in Resources */,
C2A75422219EF62800DF4209 /* combined_mobilenet_model in Resources */,
C2A75441219EF62800DF4209 /* batch_norm_31.b_0 in Resources */,
C2A75446219EF62800DF4209 /* batch_norm_16.w_2 in Resources */,
C2A754E9219EF62800DF4209 /* depthwise_conv2d_6.w_0 in Resources */,
C2A7545B219EF62800DF4209 /* conv2d_11.w_0 in Resources */,
C2A754F9219EF62800DF4209 /* ar_model in Resources */,
C2A7547A219EF62800DF4209 /* batch_norm_24.w_0 in Resources */,
C2A7548D219EF62800DF4209 /* batch_norm_26.w_0 in Resources */,
C2A754B4219EF62800DF4209 /* batch_norm_11.w_0 in Resources */,
C2A7545A219EF62800DF4209 /* batch_norm_21.b_0 in Resources */,
C2A75434219EF62800DF4209 /* conv2d_16.w_0 in Resources */,
C2A75444219EF62800DF4209 /* conv2d_15.w_0 in Resources */,
C2A754E0219EF62800DF4209 /* batch_norm_27.w_2 in Resources */,
C2A75492219EF62800DF4209 /* batch_norm_31.w_1 in Resources */,
C2A754BA219EF62800DF4209 /* batch_norm_11.w_1 in Resources */,
C2A754DA219EF62800DF4209 /* batch_norm_29.b_0 in Resources */,
C2A7546D219EF62800DF4209 /* batch_norm_34.w_1 in Resources */,
C2A7549F219EF62800DF4209 /* batch_norm_15.w_1 in Resources */,
C2A754E1219EF62800DF4209 /* batch_norm_33.w_2 in Resources */,
C2A7543F219EF62800DF4209 /* batch_norm_4.w_0 in Resources */,
C2A7545C219EF62800DF4209 /* batch_norm_0.w_0 in Resources */,
C2A75499219EF62800DF4209 /* conv2d_4.w_0 in Resources */,
C2A75459219EF62800DF4209 /* batch_norm_12.w_2 in Resources */,
C2A754A0219EF62800DF4209 /* batch_norm_29.w_1 in Resources */,
C2A7543B219EF62800DF4209 /* conv2d_17.w_0 in Resources */,
C2A754A4219EF62800DF4209 /* batch_norm_14.w_0 in Resources */,
C2A7544E219EF62800DF4209 /* batch_norm_24.b_0 in Resources */,
C2A7546F219EF62800DF4209 /* batch_norm_0.b_0 in Resources */,
C2A754B2219EF62800DF4209 /* batch_norm_3.w_2 in Resources */,
C2A754AD219EF62800DF4209 /* batch_norm_15.w_0 in Resources */,
C2A754A8219EF62800DF4209 /* conv2d_30.b_0 in Resources */,
C2A75456219EF62800DF4209 /* batch_norm_13.w_2 in Resources */,
C2A75498219EF62800DF4209 /* conv2d_27.b_0 in Resources */,
C2A7544F219EF62800DF4209 /* batch_norm_30.b_0 in Resources */,
C2A7543C219EF62800DF4209 /* batch_norm_33.b_0 in Resources */,
C2A75420219EF62800DF4209 /* model in Resources */,
C2A7548F219EF62800DF4209 /* batch_norm_7.b_0 in Resources */,
C2A754CE219EF62800DF4209 /* depthwise_conv2d_2.w_0 in Resources */,
C2A754C8219EF62800DF4209 /* conv2d_23.w_0 in Resources */,
C2A7542A219EF62800DF4209 /* ssd_hand_model in Resources */,
C2A75485219EF62800DF4209 /* batch_norm_18.w_1 in Resources */,
C2A75486219EF62800DF4209 /* batch_norm_6.b_0 in Resources */,
C2A754A1219EF62800DF4209 /* batch_norm_17.w_1 in Resources */,
C2A75475219EF62800DF4209 /* batch_norm_27.w_1 in Resources */,
C2A7549B219EF62800DF4209 /* conv2d_26.b_0 in Resources */,
C2A75442219EF62800DF4209 /* conv2d_29.w_0 in Resources */,
C2A754C2219EF62800DF4209 /* conv2d_23.b_0 in Resources */,
C2A7546E219EF62800DF4209 /* batch_norm_22.w_1 in Resources */,
C2A7548C219EF62800DF4209 /* conv2d_9.w_0 in Resources */,
C2A754BB219EF62800DF4209 /* depthwise_conv2d_10.w_0 in Resources */,
C2A75433219EF62800DF4209 /* batch_norm_32.b_0 in Resources */,
C2A75453219EF62800DF4209 /* conv2d_10.w_0 in Resources */,
C2A754A9219EF62800DF4209 /* conv2d_31.b_0 in Resources */,
C2A754EA219EF62800DF4209 /* conv2d_32.w_0 in Resources */,
C2A754C3219EF62800DF4209 /* batch_norm_1.w_2 in Resources */,
C2A75457219EF62800DF4209 /* batch_norm_2.w_1 in Resources */,
C2A754CA219EF62800DF4209 /* batch_norm_34.w_2 in Resources */,
C2A754EE219EF62800DF4209 /* batch_norm_25.w_2 in Resources */,
C2A75462219EF62800DF4209 /* batch_norm_0.w_1 in Resources */,
C2A754DE219EF62800DF4209 /* batch_norm_32.w_2 in Resources */,
C2A754BD219EF62800DF4209 /* conv2d_22.b_0 in Resources */,
C2A754A2219EF62800DF4209 /* batch_norm_9.b_0 in Resources */,
C2A75430219EF62800DF4209 /* model in Resources */,
C2A7549E219EF62800DF4209 /* batch_norm_4.w_2 in Resources */,
C2A754C9219EF62800DF4209 /* batch_norm_20.w_2 in Resources */,
C2A754FA219EF62800DF4209 /* ar_params in Resources */,
C2A754EB219EF62800DF4209 /* conv2d_26.w_0 in Resources */,
C2A754CF219EF62800DF4209 /* depthwise_conv2d_0.w_0 in Resources */,
C2A75484219EF62800DF4209 /* batch_norm_24.w_1 in Resources */,
C2A7543E219EF62800DF4209 /* batch_norm_6.w_0 in Resources */,
C2A75489219EF62800DF4209 /* batch_norm_27.w_0 in Resources */,
C2A754EC219EF62800DF4209 /* batch_norm_16.b_0 in Resources */,
C2A754B8219EF62800DF4209 /* depthwise_conv2d_12.w_0 in Resources */,
C2A754D0219EF62800DF4209 /* batch_norm_10.b_0 in Resources */,
C2E33ADE217EB80E0097FDD6 /* synset.txt in Resources */,
C2A75431219EF62800DF4209 /* batch_norm_7.w_0 in Resources */,
C2A754F1219EF62800DF4209 /* batch_norm_9.w_1 in Resources */,
C2A75439219EF62800DF4209 /* batch_norm_28.w_2 in Resources */,
C2A75448219EF62800DF4209 /* batch_norm_7.w_1 in Resources */,
C2A75478219EF62800DF4209 /* batch_norm_18.w_0 in Resources */,
C2A75423219EF62800DF4209 /* yolo_params in Resources */,
C2A7542C219EF62800DF4209 /* params in Resources */,
C2E33AE0217EB80E0097FDD6 /* hand.jpg in Resources */,
C2A754DD219EF62800DF4209 /* batch_norm_15.b_0 in Resources */,
C2A7548B219EF62800DF4209 /* batch_norm_32.w_0 in Resources */,
C2A754E2219EF62800DF4209 /* conv2d_18.w_0 in Resources */,
C2A754D2219EF62800DF4209 /* batch_norm_23.w_2 in Resources */,
C2A7544D219EF62800DF4209 /* conv2d_28.w_0 in Resources */,
C2A754C0219EF62800DF4209 /* batch_norm_13.w_0 in Resources */,
C2A75443219EF62800DF4209 /* batch_norm_25.b_0 in Resources */,
C2A7542D219EF62800DF4209 /* model in Resources */,
C2A75426219EF62800DF4209 /* genet_model in Resources */,
C2A754CD219EF62800DF4209 /* batch_norm_12.b_0 in Resources */,
C2A7546C219EF62800DF4209 /* batch_norm_20.w_1 in Resources */,
C2A754DC219EF62800DF4209 /* conv2d_19.w_0 in Resources */,
C2A754E6219EF62800DF4209 /* batch_norm_28.b_0 in Resources */,
C2A75449219EF62800DF4209 /* batch_norm_6.w_1 in Resources */,
FC039B8720E11C550081E9F8 /* Main.storyboard in Resources */,
C2A7548E219EF62800DF4209 /* batch_norm_8.w_2 in Resources */,
C2A75467219EF62800DF4209 /* batch_norm_21.w_1 in Resources */,
C2A754DB219EF62800DF4209 /* conv2d_31.w_0 in Resources */,
C2A754F3219EF62800DF4209 /* batch_norm_24.w_2 in Resources */,
C2A75451219EF62800DF4209 /* batch_norm_5.w_0 in Resources */,
C2A7546B219EF62800DF4209 /* batch_norm_2.b_0 in Resources */,
C2A75460219EF62800DF4209 /* batch_norm_10.w_2 in Resources */,
C2A7544B219EF62800DF4209 /* conv2d_14.w_0 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -490,7 +1422,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = A798K58VVL;
DEVELOPMENT_TEAM = 6K8JTBT3MF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "paddle-mobile-demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
......@@ -517,7 +1449,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = A798K58VVL;
DEVELOPMENT_TEAM = 6K8JTBT3MF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "paddle-mobile-demo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
......
......@@ -17,7 +17,7 @@ import MetalKit
import Foundation
import paddle_mobile
class MetalHelper {
public class MetalHelper {
let device: MTLDevice
let queue: MTLCommandQueue
let textureLoader: MTKTextureLoader
......
......@@ -23,23 +23,23 @@ let threadSupport: [(Platform, String)] = [(.GPU, "GPU"), (.CPU, "CPU")]
//.mobilenet_ssd : Runner.init(inNet: MobileNet_ssd_hand.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform),
let modelHelperMap: [SupportModel : Runner] = [
.genet : Runner.init(inNet: Genet.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform),
.mobilenet_ssd_ar : Runner.init(inNet: MobileNet_ssd_AR.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform)]
.yolo : Runner.init(inNet: YoloNet.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform),
.mobilenet_combined : Runner.init(inNet: MobileNetCombined.init(device: MetalHelper.shared.device), commandQueue: MetalHelper.shared.queue, inPlatform: platform)]
//, .genet : Genet.init()
//let modelHelperMap: [SupportModel : Net] = [.mobilenet : MobileNet.init(), .mobilenet_ssd : MobileNet_ssd_hand.init()]
let netSupport: [SupportModel : Net] = [.genet : Genet.init(device: MetalHelper.shared.device), .mobilenet_ssd_ar : MobileNet_ssd_AR.init(device: MetalHelper.shared.device)]
let netSupport: [SupportModel : Net] = [.yolo : YoloNet.init(device: MetalHelper.shared.device), .mobilenet_combined : MobileNetCombined.init(device: MetalHelper.shared.device)]
enum SupportModel: String{
// case mobilenet = "mobilenet"
// case mobilenet_ssd = "mobilenetssd"
case genet = "genet"
case mobilenet_ssd_ar = "mobilenetssd_ar"
case yolo = "yolo"
case mobilenet_combined = "mobilenet_combined"
static func supportedModels() -> [SupportModel] {
// .mobilenet,
// .mobilenet_ssd,
return [.genet, .mobilenet_ssd_ar]
return [.yolo, .mobilenet_combined]
}
}
......@@ -98,7 +98,7 @@ class ViewController: UIViewController {
}
@IBAction func predictAct(_ sender: Any) {
let max = 50
let max = 1
switch platform {
case .GPU:
guard let inTexture = toPredictTexture else {
......@@ -106,11 +106,11 @@ class ViewController: UIViewController {
return
}
for _ in 0..<10{
runner.predict(texture: inTexture) { (success, resultHolder) in
resultHolder?.releasePointer()
}
}
// for _ in 0..<1{
// runner.predict(texture: inTexture) { (success, resultHolder) in
// resultHolder?.releasePointer()
// }
// }
let startDate = Date.init()
for i in 0..<max {
......@@ -180,7 +180,7 @@ class ViewController: UIViewController {
// } else {
// print(" load error ! ")
// }
//
//
modelPickerView.delegate = self
modelPickerView.dataSource = self
threadPickerView.delegate = self
......
......@@ -29,6 +29,11 @@
4AF9287921341661005B6C3A /* Softmax.metal in Sources */ = {isa = PBXBuildFile; fileRef = 4AF9287821341661005B6C3A /* Softmax.metal */; };
4AF928822135673D005B6C3A /* ConcatKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = 4AF928812135673D005B6C3A /* ConcatKernel.metal */; };
4AF9288421357BE3005B6C3A /* Elementwise.metal in Sources */ = {isa = PBXBuildFile; fileRef = 4AF9288321357BE3005B6C3A /* Elementwise.metal */; };
C28FDF8421B7858F0054EFAC /* MobileNetCombined.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28FDF8221B7858F0054EFAC /* MobileNetCombined.swift */; };
C28FDF8521B7858F0054EFAC /* YoloNet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28FDF8321B7858F0054EFAC /* YoloNet.swift */; };
C28FE02F21BA68C00054EFAC /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C28FE02C21BA68C00054EFAC /* Metal.framework */; };
C28FE03021BA68C00054EFAC /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C28FE02D21BA68C00054EFAC /* MetalPerformanceShaders.framework */; };
C28FE03121BA68C00054EFAC /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C28FE02E21BA68C00054EFAC /* MetalKit.framework */; };
D3831F70E7E0B565B9AC22DA /* Pods_paddle_mobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD2E06330A1E7129C918DB46 /* Pods_paddle_mobile.framework */; };
FC0226562138F33800F395E2 /* TransposeKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC0226552138F33800F395E2 /* TransposeKernel.metal */; };
FC0226582138F38D00F395E2 /* PoolKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC0226572138F38D00F395E2 /* PoolKernel.metal */; };
......@@ -72,7 +77,6 @@
FC4FD9752140E1DE0073E130 /* PaddleMobile.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC4FD9742140E1DE0073E130 /* PaddleMobile.swift */; };
FC4FD9792140E4980073E130 /* PaddleMobileCPU.h in Headers */ = {isa = PBXBuildFile; fileRef = FC4FD9772140E4980073E130 /* PaddleMobileCPU.h */; settings = {ATTRIBUTES = (Public, ); }; };
FC4FD97A2140E4980073E130 /* libpaddle-mobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4FD9782140E4980073E130 /* libpaddle-mobile.a */; };
FC4FD97E2140F2C30073E130 /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4FD97D2140F2C30073E130 /* libstdc++.tbd */; };
FC5163F620EF556E00636C28 /* Texture2DTo2DArrayKernel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC5163F520EF556E00636C28 /* Texture2DTo2DArrayKernel.swift */; };
FC60DB8920E9AAA500FF203F /* MetalExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC60DB8820E9AAA500FF203F /* MetalExtension.swift */; };
FC803BBF214CB65A0094B8E5 /* ConvAddPreluOp.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC803BBE214CB65A0094B8E5 /* ConvAddPreluOp.swift */; };
......@@ -160,6 +164,11 @@
4AF9287821341661005B6C3A /* Softmax.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = Softmax.metal; sourceTree = "<group>"; };
4AF928812135673D005B6C3A /* ConcatKernel.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = ConcatKernel.metal; sourceTree = "<group>"; };
4AF9288321357BE3005B6C3A /* Elementwise.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = Elementwise.metal; sourceTree = "<group>"; };
C28FDF8221B7858F0054EFAC /* MobileNetCombined.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MobileNetCombined.swift; sourceTree = "<group>"; };
C28FDF8321B7858F0054EFAC /* YoloNet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YoloNet.swift; sourceTree = "<group>"; };
C28FE02C21BA68C00054EFAC /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
C28FE02D21BA68C00054EFAC /* MetalPerformanceShaders.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalPerformanceShaders.framework; path = System/Library/Frameworks/MetalPerformanceShaders.framework; sourceTree = SDKROOT; };
C28FE02E21BA68C00054EFAC /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
CDF58151D902A1CBAE56A0C2 /* Pods-paddle-mobile.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile/Pods-paddle-mobile.debug.xcconfig"; sourceTree = "<group>"; };
DD2E06330A1E7129C918DB46 /* Pods_paddle_mobile.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_paddle_mobile.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E2A7957C92EDA5C3BEC0FFC2 /* Pods-paddle-mobile.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile.release.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile/Pods-paddle-mobile.release.xcconfig"; sourceTree = "<group>"; };
......@@ -277,7 +286,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FC4FD97E2140F2C30073E130 /* libstdc++.tbd in Frameworks */,
C28FE02F21BA68C00054EFAC /* Metal.framework in Frameworks */,
C28FE03021BA68C00054EFAC /* MetalPerformanceShaders.framework in Frameworks */,
C28FE03121BA68C00054EFAC /* MetalKit.framework in Frameworks */,
D3831F70E7E0B565B9AC22DA /* Pods_paddle_mobile.framework in Frameworks */,
FC4FD97A2140E4980073E130 /* libpaddle-mobile.a in Frameworks */,
);
......@@ -289,6 +300,9 @@
336CBE234BF5DE48658DE65F /* Frameworks */ = {
isa = PBXGroup;
children = (
C28FE02C21BA68C00054EFAC /* Metal.framework */,
C28FE02E21BA68C00054EFAC /* MetalKit.framework */,
C28FE02D21BA68C00054EFAC /* MetalPerformanceShaders.framework */,
FC4FD97D2140F2C30073E130 /* libstdc++.tbd */,
DD2E06330A1E7129C918DB46 /* Pods_paddle_mobile.framework */,
);
......@@ -325,6 +339,8 @@
FC039B6C20E11C3C0081E9F8 /* paddle-mobile */ = {
isa = PBXGroup;
children = (
C28FDF8221B7858F0054EFAC /* MobileNetCombined.swift */,
C28FDF8321B7858F0054EFAC /* YoloNet.swift */,
FCE9D7B6214F869000B520C3 /* Net.swift */,
FC9A19E22148C31300CD9CBF /* MobilenetSSD_AR.swift */,
FC33B0EF2147659000714A93 /* MobileNet.swift */,
......@@ -681,6 +697,7 @@
FC039BBA20E11CC20081E9F8 /* TensorDesc.swift in Sources */,
FC039BA020E11CB20081E9F8 /* Dim.swift in Sources */,
FC039BB820E11CC20081E9F8 /* framework.pb.swift in Sources */,
C28FDF8521B7858F0054EFAC /* YoloNet.swift in Sources */,
FC039B9920E11C9A0081E9F8 /* Types.swift in Sources */,
FC4CB74920F0B954007C0C6D /* ConvKernel.metal in Sources */,
FCA3A1632132A4AC00084FE5 /* ReshapeKernel.metal in Sources */,
......@@ -725,6 +742,7 @@
FCE9D7B7214F869000B520C3 /* Net.swift in Sources */,
FC0E2DBE20EE460D009C1FAC /* BatchNormKernel.swift in Sources */,
FC039BAB20E11CBC0081E9F8 /* Operator.swift in Sources */,
C28FDF8421B7858F0054EFAC /* MobileNetCombined.swift in Sources */,
FCD04E6A20F319EC0007374F /* SoftmaxOp.swift in Sources */,
FC292C82214255BD00CF622F /* MobileNetSSD.swift in Sources */,
FCBCCC612122FBDF00D94F7E /* PriorBoxKernel.swift in Sources */,
......@@ -885,9 +903,9 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = A798K58VVL;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
......@@ -904,10 +922,11 @@
"$(inherited)",
"$(PROJECT_DIR)/paddle-mobile/CPU",
);
MACH_O_TYPE = mh_dylib;
MACH_O_TYPE = staticlib;
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
PRODUCT_BUNDLE_IDENTIFIER = "orange.paddle-mobile";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
......@@ -921,9 +940,9 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = A798K58VVL;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
......@@ -940,10 +959,11 @@
"$(inherited)",
"$(PROJECT_DIR)/paddle-mobile/CPU",
);
MACH_O_TYPE = mh_dylib;
MACH_O_TYPE = staticlib;
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
PRODUCT_BUNDLE_IDENTIFIER = "orange.paddle-mobile";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
......
......@@ -13,6 +13,8 @@
limitations under the License. */
import Foundation
import MetalKit
import CoreMedia
fileprivate var defaultMetalLibrary: MTLLibrary?
fileprivate var paddleMobileMetalLibrary: MTLLibrary?
......
//
// MobileNetCombined.swift
// paddle-mobile
//
// Created by Xiao,Haichun on 2018/12/5.
// Copyright © 2018 orange. All rights reserved.
//
import Foundation
public class MobileNetCombined: Net {
@objc public override init(device: MTLDevice) {
super.init(device: device)
means = [0, 0, 0]
scale = 1
except = 0
modelPath = Bundle.main.path(forResource: "combined_mobilenet_model", ofType: nil) ?! "model null"
paramPath = Bundle.main.path(forResource: "combined_mobilenet_params", ofType: nil) ?! "para null"
modelDir = ""
//preprocessKernel = GenetPreProccess.init(device: device)
dim = (n: 1, h: 416, w: 416, c: 3)
}
@objc override public init(device: MTLDevice,paramPointer: UnsafeMutableRawPointer, paramSize:Int, modePointer: UnsafeMutableRawPointer, modelSize: Int) {
super.init(device:device,paramPointer:paramPointer,paramSize:paramSize,modePointer:modePointer,modelSize:modelSize)
means = [0, 0, 0]
scale = 1
except = 0
modelPath = ""
paramPath = ""
modelDir = ""
//preprocessKernel = GenetPreProccess.init(device: device)
dim = (n: 1, h: 416, w: 416, c: 3)
}
// class GenetPreProccess: CusomKernel {
// init(device: MTLDevice) {
// let s = CusomKernel.Shape.init(inWidth: 128, inHeight: 128, inChannel: 3)
// super.init(device: device, inFunctionName: "genet_preprocess", outputDim: s, usePaddleMobileLib: false)
// }
// }
override public func resultStr(res: ResultHolder) -> String {
// fatalError()
return " \(res.result![0]) ... "
}
}
......@@ -14,6 +14,7 @@
import Foundation
import Metal
public class ResultHolder: NSObject {
@objc public let result: UnsafeMutablePointer<Float32>?
......
......@@ -67,7 +67,8 @@ class OpCreator<P: PrecisionType> {
gFlatten : FlattenOp<P>.creat,
gConvAddPreluType : ConvAddPreluOp<P>.creat,
gConvAddAddPreluType : ConvAddAddPreluOp<P>.creat,
gElementwiseAddPreluType: ElementwiseAddPreluOp<P>.creat]
gElementwiseAddPreluType : ElementwiseAddPreluOp<P>.creat,
gFusionConvAddType : ConvAddOp<P>.creat]
private init(){}
}
......@@ -26,7 +26,7 @@ protocol OpParam {
var output: OutputType { get set }
func outputDesc() -> String
associatedtype ParamPrecisionType: PrecisionType
//associatedtype ParamPrecisionType: PrecisionType
init(opDesc: OpDesc, inScope: Scope) throws
static func getFirstTensor<VarType: Variant>(key: String, map: [String : [String]], from: Scope) throws -> VarType
static func inputX<VarType: Variant>(inputs: [String : [String]], from: Scope) throws -> VarType
......
......@@ -158,7 +158,8 @@ let gShape = "shape"
let gFlatten = "flatten"
let gConvAddPreluType = "conv_add_prelu"
let gConvAddAddPreluType = "conv_add_add_prelu"
let gElementwiseAddPreluType = "elementwise_add_prelu"
let gElementwiseAddPreluType = "elementwise_add_prelu"
let gFusionConvAddType = "fusion_conv_add"
let opInfos = [gConvType : (inputs: ["Input"], outputs: ["Output"]),
......@@ -188,5 +189,6 @@ let opInfos = [gConvType : (inputs: ["Input"], outputs: ["Out
gFlatten : (inputs: ["X"], outputs: ["Out"]),
gConvAddPreluType : (inputs: ["Input"], outputs: ["Out"]),
gConvAddAddPreluType : (inputs: ["Input"], outputs: ["Out"]),
gElementwiseAddPreluType : (inputs: ["X"], outputs: ["Out"])
gElementwiseAddPreluType : (inputs: ["X"], outputs: ["Out"]),
gFusionConvAddType : (inputs: ["Input"], outputs: ["Out"])
]
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class BatchNormParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try BatchNormParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class BilinearInterpParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try BilinearInterpParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class BoxcoderParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
priorBox = try BoxcoderParam.getFirstTensor(key: "PriorBox", map: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class ConcatParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
guard let xlist = opDesc.inputs["X"] else {
......
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class ConvAddAddPreluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
filter = try ConvAddAddPreluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope)
......@@ -34,8 +35,8 @@ class ConvAddAddPreluParam<P: PrecisionType>: OpParam {
}
let input: Texture<P>
let y: Tensor<ParamPrecisionType>
let filter: Tensor<ParamPrecisionType>
let y: Tensor<P>
let filter: Tensor<P>
let mode: String
let alpha: Tensor<P>
var output: Texture<P>
......
......@@ -16,7 +16,7 @@ import Foundation
class ConvAddBatchNormReluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
......@@ -42,12 +42,12 @@ class ConvAddBatchNormReluParam<P: PrecisionType>: OpParam {
let input: Texture<P>
let variance: Tensor<ParamPrecisionType>
let bias: Tensor<ParamPrecisionType>
let mean: Tensor<ParamPrecisionType>
let scale: Tensor<ParamPrecisionType>
let y: Tensor<ParamPrecisionType>
let filter: Tensor<ParamPrecisionType>
let variance: Tensor<P>
let bias: Tensor<P>
let mean: Tensor<P>
let scale: Tensor<P>
let y: Tensor<P>
let filter: Tensor<P>
let epsilon: Float32
var newScale: MTLBuffer?
var newBiase: MTLBuffer?
......
......@@ -15,7 +15,7 @@
import Foundation
class ConvAddParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
filter = try ConvAddParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope)
......@@ -33,8 +33,8 @@ class ConvAddParam<P: PrecisionType>: OpParam {
}
let input: Texture<P>
let y: Tensor<ParamPrecisionType>
let filter: Tensor<ParamPrecisionType>
let y: Tensor<P>
let filter: Tensor<P>
var output: Texture<P>
let stride: [Int32]
......
......@@ -15,7 +15,7 @@
import Foundation
class ConvAddPreluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
filter = try ConvAddPreluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope)
......@@ -34,8 +34,8 @@ class ConvAddPreluParam<P: PrecisionType>: OpParam {
}
let input: Texture<P>
let y: Tensor<ParamPrecisionType>
let filter: Tensor<ParamPrecisionType>
let y: Tensor<P>
let filter: Tensor<P>
let mode: String
let alpha: Tensor<P>
var output: Texture<P>
......
......@@ -15,7 +15,7 @@
import Foundation
class ConvBNReluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
filter = try ConvBNReluParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope)
......@@ -38,11 +38,11 @@ class ConvBNReluParam<P: PrecisionType>: OpParam {
let input: Texture<P>
let variance: Tensor<ParamPrecisionType>
let bias: Tensor<ParamPrecisionType>
let mean: Tensor<ParamPrecisionType>
let scale: Tensor<ParamPrecisionType>
let filter: Tensor<ParamPrecisionType>
let variance: Tensor<P>
let bias: Tensor<P>
let mean: Tensor<P>
let scale: Tensor<P>
let filter: Tensor<P>
let epsilon: Float32
var newScale: MTLBuffer?
var newBiase: MTLBuffer?
......
......@@ -15,7 +15,7 @@
import Foundation
class ConvParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
filter = try ConvParam.inputFilter(paraInputs: opDesc.paraInputs, from: inScope)
......@@ -32,7 +32,7 @@ class ConvParam<P: PrecisionType>: OpParam {
}
let input: Texture<P>
let filter: Tensor<ParamPrecisionType>
let filter: Tensor<P>
var output: Texture<P>
let stride: [Int32]
let paddings: [Int32]
......
......@@ -15,8 +15,8 @@
import Foundation
class ConvTransposeParam<P: PrecisionType>: ConvParam<P> {
typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
try super.init(opDesc: opDesc, inScope: inScope)
} catch let error {
......
......@@ -13,9 +13,10 @@
// limitations under the License. */
import Foundation
import Metal
class ElementwiseAddParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
inputX = try ElementwiseAddParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class ElementwiseAddPreluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
alpha = try ElementwiseAddPreluParam.paramInputAlpha(inputs: opDesc.paraInputs, from: inScope)
......
......@@ -13,6 +13,8 @@
limitations under the License. */
import Foundation
import MetalKit
import CoreMedia
class FeedParam<P: PrecisionType>: OpParam{
var output: Texture<P>
......@@ -30,7 +32,7 @@ class FeedParam<P: PrecisionType>: OpParam{
}
}
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
}
class FeedOp<P: PrecisionType>: Operator<Texture2DTo2DArrayKernel<P>, FeedParam<P>>, Runable, Creator, InferShaperable {
......
......@@ -13,6 +13,7 @@
limitations under the License. */
import Foundation
import Metal
class FetchParam<P: PrecisionType>: OpParam{
var output: FetchHolder
......@@ -29,7 +30,7 @@ class FetchParam<P: PrecisionType>: OpParam{
}
}
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
}
class FetchKernel<P: PrecisionType>: Kernel, Computable {
......
......@@ -15,7 +15,7 @@
import Foundation
class FlattenParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try FlattenParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,6 +13,7 @@
limitations under the License. */
import Foundation
import Metal
struct ConcatTestParam: TestParam {
var input: [MTLTexture]
......
......@@ -13,6 +13,7 @@
limitations under the License. */
import Foundation
import Metal
struct ConvAddBatchNormReluTestParam: TestParam {
let inputTexture: MTLTexture
......
......@@ -12,6 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License. */
import Metal
import Foundation
struct ShapeMetalParam {
......
......@@ -13,6 +13,8 @@
limitations under the License. */
import Foundation
import MetalKit
import CoreMedia
struct Texture2DTo2DArrayParam {
let input: MTLTexture
......
......@@ -15,7 +15,7 @@
import Foundation
class MulticlassNMSParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
scores = try MulticlassNMSParam.getFirstTensor(key: "Scores", map: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class PoolParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try PoolParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class PreluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try PreluParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class PriorBoxParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
min_max_aspect_ratios_order = try PriorBoxParam.getAttr(key: "min_max_aspect_ratios_order", attrs: opDesc.attrs)
......
......@@ -16,7 +16,7 @@
import Foundation
class ReluParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try ReluParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class ReshapeParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try ReshapeParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -15,7 +15,7 @@
import Foundation
class ShapeParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
// typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try ShapeParam.input(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,16 +13,17 @@
limitations under the License. */
import Foundation
import Metal
class SoftmaxParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try SoftmaxParam.inputX(inputs: opDesc.inputs, from: inScope)
output = try SoftmaxParam.outputOut(outputs: opDesc.outputs, from: inScope)
assert(input.tensorDim.dims.count == 2)
assert(input.transpose == [0, 1, 2, 3])
//assert(input.tensorDim.dims.count == 2)
//assert(input.transpose == [0, 1, 2, 3])
output.dim = input.dim
output.tensorDim = input.tensorDim
......
......@@ -15,7 +15,7 @@
import Foundation
class SplitParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try SplitParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -13,9 +13,10 @@
limitations under the License. */
import Foundation
import Metal
class TransposeParam<P: PrecisionType>: OpParam {
typealias ParamPrecisionType = P
//typealias ParamPrecisionType = P
required init(opDesc: OpDesc, inScope: Scope) throws {
do {
input = try TransposeParam.inputX(inputs: opDesc.inputs, from: inScope)
......
......@@ -33,7 +33,7 @@ class ScaleKernel: CusomKernel {
}
public class Runner: NSObject {
@objc public class Runner: NSObject {
var program: Program?
var executor: Executor<Float32>?
var queue: MTLCommandQueue?
......
......@@ -203,6 +203,7 @@ class ProgramOptimize<P: PrecisionType> {
var typeMapNodes: [String : [(node: Node, output: [String : Node])]] = [:]
let block = originProgramDesc.blocks[0]
for opDesc in block.ops {
print(opDesc.type)
guard let opInputKeys = opInfos[opDesc.type]?.inputs, let outputKeys = opInfos[opDesc.type]?.outputs else {
fatalError()
}
......
......@@ -85,6 +85,7 @@ extension VarDesc: CustomStringConvertible, CustomDebugStringConvertible {
if let inTensorDesc = tensorDesc {
str += " dim size: \(inTensorDesc.dims.count) \n"
str += " dim: \(inTensorDesc.dims) \n"
str += "type:\(self.type) \n"
} else {
str += " no dim info"
}
......
//
// YoloNet.swift
// paddle-mobile
//
// Created by Xiao,Haichun on 2018/12/5.
// Copyright © 2018 orange. All rights reserved.
//
import Foundation
import Metal
public class YoloNet: Net {
@objc public override init(device: MTLDevice) {
super.init(device: device)
means = [0, 0, 0]
scale = 1
except = 0
modelPath = Bundle.main.path(forResource: "yolo_model", ofType: nil) ?! "model null"
paramPath = Bundle.main.path(forResource: "yolo_params", ofType: nil) ?! "para null"
modelDir = ""
//preprocessKernel = GenetPreProccess.init(device: device)
dim = (n: 1, h: 224, w: 224, c: 3)
}
@objc override public init(device: MTLDevice,paramPointer: UnsafeMutableRawPointer, paramSize:Int, modePointer: UnsafeMutableRawPointer, modelSize: Int) {
super.init(device:device,paramPointer:paramPointer,paramSize:paramSize,modePointer:modePointer,modelSize:modelSize)
means = [0, 0, 0]
scale = 1
except = 0
modelPath = ""
paramPath = ""
modelDir = ""
//preprocessKernel = GenetPreProccess.init(device: device)
dim = (n: 1, h: 224, w: 224, c: 3)
}
// class GenetPreProccess: CusomKernel {
// init(device: MTLDevice) {
// let s = CusomKernel.Shape.init(inWidth: 128, inHeight: 128, inChannel: 3)
// super.init(device: device, inFunctionName: "genet_preprocess", outputDim: s, usePaddleMobileLib: false)
// }
// }
override public func resultStr(res: ResultHolder) -> String {
// fatalError()
return " \(res.result![0]) ... "
}
}
......@@ -13,8 +13,10 @@
limitations under the License. */
import Foundation
import MetalKit
import CoreMedia
protocol Tensorial: CustomStringConvertible, CustomDebugStringConvertible{
protocol Tensorial: Variant {
var dim: Dim { get set }
func numel() -> Int
var layout: DataLayout { get }
......@@ -61,7 +63,7 @@ class Tensor<P: PrecisionType>: Tensorial {
}
}
required init(inDim: Dim, inLayout: DataLayout = DataLayout.NCHW()) {
init(inDim: Dim, inLayout: DataLayout = DataLayout.NCHW()) {
dim = inDim
let size = inDim.numel() * MemoryLayout<P>.size
let pointer = UnsafeMutablePointer<P>.allocate(capacity: size)
......
......@@ -204,7 +204,8 @@ void fill_split_arg(struct SplitConvArgs *arg, framework::Tensor *input,
arg->conv_arg[i].image.address = input_ptr;
arg->conv_arg[i].image.scale_address = input->scale;
arg->conv_arg[i].image.channels = (uint32_t)input->dims()[1];
arg->conv_arg[i].image.channels =
(uint32_t)get_aligned_channel_num((int)(input->dims()[1])); // NOLINT
arg->conv_arg[i].image.height = (uint32_t)input->dims()[2];
arg->conv_arg[i].image.width = (uint32_t)input->dims()[3];
arg->conv_arg[i].image.pad_height = (uint32_t)padding_h;
......@@ -216,7 +217,7 @@ void fill_split_arg(struct SplitConvArgs *arg, framework::Tensor *input,
int num_after_alignment = filter::calc_aligned_num(
arg->filter_num, (int)input->dims()[1]); // NOLINT
arg->conv_arg[i].free_space =
fpga_malloc(num_after_alignment * 2 * sizeof(half));
fpga_malloc(num_after_alignment * 2 * sizeof(float)); // half
}
}
......
......@@ -16,7 +16,6 @@ limitations under the License. */
#include <memory.h>
#include <algorithm>
#include "fpga/common/fpga_common.h"
namespace paddle_mobile {
namespace fpga {
namespace filter {
......@@ -88,12 +87,25 @@ void align_filter(float **data_in, int num, int channel, int height,
*data_in = new_data;
fpga_free(temp);
}
void convert_to_fp16(float **data_in, int data_size) {
float *tmp = *data_in;
// half_float::half *tmp_data = (half_float::half *)fpga_malloc(data_size *
// sizeof(half_float::half));
int16_t *tmp_data =
(int16_t *)fpga_malloc(data_size * sizeof(int16_t)); // NOLINT
for (int i = 0; i < data_size; i++) {
// tmp_data[i] = (half_float::half)((*data_in)[i]);
tmp_data[i] = fp32_2_fp16((*data_in)[i]);
}
*data_in = (float *)tmp_data; // NOLINT
fpga_free(tmp);
}
void format_filter(float **data_in, int num, int channel, int height, int width,
int group_num, float max) {
convert_to_hwc(data_in, num, channel, height, width);
align_filter(data_in, num, channel, height, width);
int pixel_num = calc_aligned_total_pixel_num(num, channel, height, width);
convert_to_fp16(data_in, pixel_num);
fpga_flush(*data_in, pixel_num * sizeof(float));
}
......@@ -115,6 +127,7 @@ void format_fc_filter(float **data_in, int num, int channel, int height,
convert_fc_filter(data_in, num, chw);
align_filter(data_in, num, channel, height, width);
int pixel_num = calc_aligned_total_pixel_num(num, channel, height, width);
convert_to_fp16(data_in, pixel_num);
fpga_flush(*data_in, pixel_num * sizeof(float));
}
......
......@@ -13,40 +13,53 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "fpga/common/pe.h"
#include "fpga/V2/api.h"
#include "fpga/V2/filter.h"
#include "fpga/V2/image.h"
#include "fpga/common/config.h"
#include "fpga/common/driver.h"
using namespace std; // NOLINT
using namespace paddle_mobile::fpga::driver; // NOLINT
namespace paddle_mobile {
namespace fpga {
#define MUL8(x) ((x)*8)
#define BYPASS_DONE 1
#define MUL8(x) (x * 8)
#define BYPASS_DONE 2
#define CONV_DONE 1
static inline int get_image_out_axis(int src_len, int pad, int kernel_len,
int kernel_step) {
if (kernel_step == 0) {
return 0;
}
return (src_len + 2 * pad - kernel_len) / kernel_step + 1;
}
float Findfp16Max() {
uint16_t abs_vals[16];
uint64_t max_fp16;
max_fp16 = driver::reg_readq(MUL8(49));
abs_vals[0] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT
abs_vals[1] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT
abs_vals[2] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT
abs_vals[3] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT
max_fp16 = driver::reg_readq(MUL8(50));
abs_vals[4] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT
abs_vals[5] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT
abs_vals[6] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT
abs_vals[7] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT
max_fp16 = driver::reg_readq(MUL8(51));
abs_vals[8] = (uint16_t)(0x0000007f & (max_fp16)); // NOLINT
abs_vals[9] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT
abs_vals[10] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT
abs_vals[11] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT
max_fp16 = driver::reg_readq(MUL8(52));
abs_vals[12] = (uint16_t)(0x0000007f & (max_fp16));
abs_vals[13] = (uint16_t)(0x0000007f & (max_fp16 >> 16)); // NOLINT
abs_vals[14] = (uint16_t)(0x0000007f & (max_fp16 >> 32)); // NOLINT
abs_vals[15] = (uint16_t)(0x0000007f & (max_fp16 >> 48)); // NOLINT
max_fp16 = reg_readq(MUL8(49));
abs_vals[0] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT
abs_vals[1] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT
abs_vals[2] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT
abs_vals[3] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT
max_fp16 = reg_readq(MUL8(50));
abs_vals[4] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT
abs_vals[5] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT
abs_vals[6] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT
abs_vals[7] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT
max_fp16 = reg_readq(MUL8(51));
abs_vals[8] = (uint16_t)(0x0000007fff & (max_fp16)); // NOLINT
abs_vals[9] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT
abs_vals[10] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT
abs_vals[11] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT
max_fp16 = reg_readq(MUL8(52));
abs_vals[12] = (uint16_t)(0x0000007fff & (max_fp16));
abs_vals[13] = (uint16_t)(0x0000007fff & (max_fp16 >> 16)); // NOLINT
abs_vals[14] = (uint16_t)(0x0000007fff & (max_fp16 >> 32)); // NOLINT
abs_vals[15] = (uint16_t)(0x0000007fff & (max_fp16 >> 48)); // NOLINT
uint16_t tmp = 0;
for (int i = 0; i < 16; i++) {
......@@ -54,6 +67,7 @@ float Findfp16Max() {
tmp = abs_vals[i];
}
}
DLOG << "max value found: " << fp16_2_fp32(tmp);
return fp16_2_fp32(tmp) / 127.0f;
}
......@@ -88,7 +102,473 @@ int ComputeBasicConv(const struct ConvArgs &args) {
return 0;
#endif
return 0;
uint64_t ifm_pixel_num =
((args.image.width) * (args.image.height) * args.image.channels);
uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT
uint64_t flt_pixel_num = (args.filter_num * (args.kernel.width) * // NOLINT
(args.kernel.height) * args.image.channels);
uint64_t filter_memory_size = flt_pixel_num * sizeof(short); // NOLINT
uint64_t bn_pixel_num = (args.filter_num * 2); // NOLINT
uint64_t bn_memory_size = bn_pixel_num * sizeof(float);
uint64_t ofm_width =
((args.image.width) + 2 * args.image.pad_width - args.kernel.width) /
(args.kernel.stride_w) +
1;
uint64_t ofm_height = ((args.image.height) + 2 * (args.image.pad_height) -
(args.kernel.height)) /
(args.kernel.stride_h) +
1;
uint32_t filter_num = args.filter_num;
uint32_t image_channels = args.image.channels;
DLOG << "filter_num: " << filter_num;
uint64_t ifm_src_paddr = vaddr_to_paddr((args.image.address));
uint64_t flt_src_paddr = vaddr_to_paddr((args.filter_address));
uint64_t sb_src_paddr = vaddr_to_paddr((args.free_space));
uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address));
/**********BN******************/
float image_inv_scale = (args.image.scale_address)[0];
float filter_inv_scale = (args.filter_scale_address)[0];
float scale_tmp = image_inv_scale * filter_inv_scale;
int idx = 0;
float tmp = 0.0;
float *convert_sb_addr = (float *)(args.free_space); // NOLINT
for (idx = 0; idx < args.filter_num * 2; idx++) {
if (idx % 2 == 1) {
tmp = ((float *)(args.sb_address))[idx] * scale_tmp; // NOLINT
} else {
tmp = ((float *)(args.sb_address))[idx]; // NOLINT
}
convert_sb_addr[idx] = tmp; // NOLINT
}
fpga_flush(convert_sb_addr, args.filter_num * 2 * sizeof(float));
reg_writeq(1, MUL8(24));
usleep(1);
reg_writeq(0, MUL8(24));
reg_writeq(sb_src_paddr, MUL8(27));
reg_writeq(0, MUL8(0));
uint64_t bps_addr = 0x8c00000000000000;
bps_addr += bn_memory_size;
reg_writeq(bps_addr, MUL8(0));
int ret = -1;
ret = fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffff);
if (ret) {
DLOG << "conv bypass failed";
return ret;
}
reg_readq(MUL8(63));
/*********configuring registers*************/
uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr;
uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr;
uint32_t cmd_scale_base_addr = (uint32_t)sb_src_paddr;
uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr;
uint64_t cmd_group_num = args.group_num;
uint64_t cmd_filter_per_group = filter_num / cmd_group_num;
uint64_t cmd_flt_sqr_len = (args.kernel.width) * (args.kernel.height);
uint64_t cmd_ifm_pre_row_num = 0;
if (1 == args.image.height) {
cmd_ifm_pre_row_num = 1;
} else {
cmd_ifm_pre_row_num =
(args.kernel.height) - (args.image.pad_height) + (args.kernel.stride_h);
}
uint64_t cmd_flt_pre_batch_num = 1;
uint64_t cmd_ifm_pack_num_per_row_mns1 =
(uint64_t)(((args.image.channels) + 127) / 128) - 1;
uint64_t cmd_bn_num = filter_num;
uint64_t cmd_bias_num = filter_num;
uint64_t cmd_ifm_stride_row_length = args.image.width * args.kernel.stride_h;
uint64_t cmd_flt_pack_num_per_kernel_mns1 =
(uint64_t)(((args.image.channels) + 127) / 128) - 1;
uint64_t cmd_ofm_width_mns1 = (uint64_t)(
((args.image.width) - (args.kernel.width) + 2 * (args.image.pad_width)) /
(args.kernel.stride_w));
uint64_t cmd_ofm_height =
(uint64_t)(((args.image.height) - (args.kernel.height) +
2 * (args.image.pad_height)) /
(args.kernel.stride_h)) +
1;
uint64_t cmd_channel_num = 0;
uint64_t cmd_ifm_pack_len = 0;
uint64_t cmd_channel_per_group = 0;
uint64_t cmd_flt_batch_num_mns1 = 0;
uint64_t cmd_flt_N_impl = 8;
uint64_t cmd_ifm_C_impl = 16;
uint64_t cmd_flt_pack_length = 0;
uint64_t cmd_step_h_mul_row_byte_len = 0;
uint64_t cmd_pad_h_mul_row_byte_len = 0;
uint64_t cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7) / 8) * 8);
uint64_t row_len_align = args.image.width;
if (image_channels > 64) {
cmd_channel_num = (uint64_t)((((args.image.channels) + 127)) / 128) * 128;
cmd_ifm_pack_len = 128 * (args.image.width);
cmd_channel_per_group = 128;
cmd_flt_batch_num_mns1 = (uint64_t)(((args.filter_num + 7)) / 8 - 1);
cmd_flt_N_impl = 8;
cmd_ifm_C_impl = 128;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 128;
cmd_step_h_mul_row_byte_len =
(args.kernel.stride_h) * cmd_channel_num * (args.image.width);
cmd_pad_h_mul_row_byte_len =
(args.image.pad_height) * cmd_channel_num * (args.image.width);
cmd_ifm_pack_byte_length = 128 * (args.image.width);
row_len_align = args.image.width * (cmd_ifm_pack_num_per_row_mns1 + 1);
} else if (image_channels > 32) {
cmd_channel_num = 64;
cmd_ifm_pack_len = 64 * (args.image.width);
cmd_channel_per_group = 64;
cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 15)) / 16 - 1);
cmd_flt_N_impl = 16;
cmd_ifm_C_impl = 64;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 64;
cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num *
((((args.image.width) + 1)) / 2) * 2;
cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num *
((((args.image.width) + 1)) / 2) * 2;
cmd_ifm_pack_byte_length =
64 * (uint64_t)((((args.image.width) + 1)) / 2) * 2;
row_len_align = (uint64_t)((((args.image.width) + 1)) / 2);
} else if (image_channels > 16) {
cmd_channel_num = 32;
cmd_ifm_pack_len = 32 * (args.image.width);
cmd_channel_per_group = 32;
cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 31)) / 32 - 1);
cmd_flt_N_impl = 32;
cmd_ifm_C_impl = 32;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 32;
cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num *
((((args.image.width) + 3)) / 4) * 4;
cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num *
((((args.image.width) + 3)) / 4) * 4;
cmd_ifm_pack_byte_length =
32 * (uint64_t)((((args.image.width) + 3)) / 4) * 4;
row_len_align = (uint64_t)((((args.image.width) + 3)) / 4);
} else {
cmd_channel_num = 16;
cmd_ifm_pack_len = 16 * (args.image.width);
cmd_channel_per_group = 16;
cmd_flt_batch_num_mns1 = (uint64_t)((((args.filter_num) + 63)) / 64 - 1);
cmd_flt_N_impl = 64;
cmd_ifm_C_impl = 16;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 16;
cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num *
((((args.image.width) + 7)) / 8) * 8;
cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num *
((((args.image.width) + 7)) / 8) * 8;
cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7)) / 8) * 8;
row_len_align = (uint64_t)((((args.image.width) + 7)) / 8);
}
uint64_t cmd_flt_length =
(args.kernel.width) * (args.kernel.height) * cmd_channel_num;
uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image.width);
uint64_t cmd_ifm_buf_col_len = 0;
uint64_t ifm_one_batch_len =
(1048576 / ((args.image.width) * cmd_channel_num));
uint64_t cmd_ifm_batch_num_tmp = (uint64_t)(
((args.image.height) + ifm_one_batch_len - 1) / ifm_one_batch_len);
if (1 == cmd_ifm_batch_num_tmp) {
cmd_ifm_buf_col_len = args.image.height;
} else {
if (((args.image.height) / (cmd_ifm_batch_num_tmp) % 2) == 0) {
cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp;
} else {
cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp - 1;
}
}
uint64_t cmd_ifm_batch_num_mns1 =
(((args.image.height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) -
1;
uint64_t cmd_flt_cycle_num_mns1 = cmd_ifm_batch_num_mns1;
uint64_t cmd_flt_total_batch_num = filter_num / cmd_flt_N_impl;
uint64_t cmd_ifm_buf_col_len_rem =
(args.image.height) -
cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len; //= -4;
uint64_t cmd_flt_N_len = args.kernel.width * args.kernel.height *
(cmd_flt_pack_num_per_kernel_mns1 + 1);
//-------- ofm batch number reg && initial URAM reading address
// logic-----------------
uint64_t cmd_init_raddr_cnt = 1;
uint64_t cmd_init_raddr_flag = 0;
int64_t cmd_init_raddr_index = -8;
int64_t cmd_init_raddr_col_0 = -4;
int64_t cmd_init_raddr_col_1 = -4;
uint64_t conv_ofm_buf_col_len = 0;
uint64_t conv_ofm_buf_col_len_rem = 0;
if (((args.image.pad_height) % (2 * (args.kernel.stride_h))) == 0) {
cmd_init_raddr_cnt = 0;
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (((args.image.pad_height) + 1) / 2);
cmd_init_raddr_col_0 = cmd_init_raddr_index;
cmd_init_raddr_col_1 = cmd_init_raddr_index;
} else if (((args.image.pad_height) -
2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <=
(args.kernel.stride_h)) {
cmd_init_raddr_cnt =
(args.kernel.stride_h) -
((args.image.pad_height) -
((args.image.pad_height) / (2 * (args.kernel.stride_h))));
cmd_init_raddr_flag = 1;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * args.kernel.stride_h));
cmd_init_raddr_col_0 =
0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * (args.kernel.stride_h)));
cmd_init_raddr_col_1 = 0;
} else if (((args.image.pad_height) -
2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <=
2 * (args.kernel.stride_h)) {
cmd_init_raddr_cnt =
2 * (args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h))) -
(args.image.pad_height);
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h)));
cmd_init_raddr_col_0 =
0 -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * (args.kernel.stride_h))) -
(int64_t)row_len_align *
(2 * (args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h))) -
(args.image.pad_height));
cmd_init_raddr_col_1 = cmd_init_raddr_col_0;
}
if (cmd_ifm_batch_num_mns1 == 0) {
if ((args.kernel.height) <= (args.kernel.stride_h)) {
conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) -
3 * (args.kernel.stride_h);
} else {
conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) -
2 * (args.kernel.stride_h) - (args.kernel.height);
}
conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len;
} else {
int N_rem = 0;
int row_rem = 0;
if ((args.kernel.height) <= (args.kernel.stride_h)) {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (args.kernel.stride_h);
N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) /
(args.kernel.stride_h) +
1;
row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem;
conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem +
2 * (args.image.pad_height) + row_rem -
3 * (args.kernel.stride_h);
} else {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (args.image.pad_height) -
2 * (args.kernel.stride_h) - (args.kernel.height);
N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) /
(args.kernel.stride_h) +
1;
row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem;
conv_ofm_buf_col_len_rem =
cmd_ifm_buf_col_len_rem + (args.image.pad_height) + row_rem -
2 * (args.kernel.stride_h) - (args.kernel.height);
}
}
//----------------------- para functions --------------------------------
float filter_quant_scale_tmp = ((args.filter_scale_address)[1]);
float image_quant_scale_tmp = ((args.image.scale_address)[1]);
uint32_t cmd_filter_quant_scale =
*(uint32_t *)(&filter_quant_scale_tmp); // NOLINT
uint32_t cmd_image_quant_scale =
*(uint32_t *)(&image_quant_scale_tmp); // NOLINT
uint64_t wParallelsim = cmd_flt_N_impl >> 3;
uint64_t wParallelsim_num =
(uint64_t)(((args.filter_num) + cmd_flt_N_impl - 1) / cmd_flt_N_impl) - 1;
uint64_t win_size = (args.kernel.width) * (args.kernel.height) *
(cmd_ifm_pack_num_per_row_mns1 + 1) -
1;
uint64_t conv_ofm_width = (((args.image.width) - (args.kernel.width) +
(args.image.pad_width) + (args.image.pad_width)) /
(args.kernel.stride_w));
uint64_t conv_ofm_dma_length = cmd_flt_N_impl * sizeof(short); // NOLINT
uint64_t conv_ofm_dma_stride = args.filter_num * sizeof(short); // NOLINT
uint64_t conv_ofm_height_batch_tmp =
get_image_out_axis(args.image.height, args.image.pad_height,
args.kernel.height, args.kernel.stride_h);
uint64_t conv_ofm_height_batch = (conv_ofm_height_batch_tmp + 1) / 2 - 1;
uint64_t o_ust_rst = 0;
uint64_t conv_ofm_dma_repeat =
(uint64_t)(((((args.image.width) - (args.kernel.width) +
(args.image.pad_width) + (args.image.pad_width))) /
(args.kernel.stride_w)) +
1);
uint64_t conv_ofm_dma_offset =
args.filter_num * conv_ofm_dma_repeat * sizeof(short); // NOLINT
uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2;
//----------------- register contation ------------------
uint64_t cmd_ifm_flt_base_addr = ((uint64_t)cmd_filter_vir_base_addr << 32) |
((uint64_t)cmd_image_vir_base_addr);
uint64_t cmd_ifm_flt_dim = ((uint64_t)(args.kernel.height) << 48) |
((uint64_t)(args.kernel.width) << 32) |
((uint64_t)(args.image.height) << 16) |
((uint64_t)(args.image.width));
uint64_t cmd_pad_step_size = ((uint64_t)(args.kernel.stride_h) << 48) |
((uint64_t)(args.kernel.stride_w) << 32) |
((uint64_t)(args.image.pad_height) << 16) |
((uint64_t)(args.image.pad_width));
uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) |
((uint64_t)cmd_channel_num << 32) |
((uint64_t)filter_num << 16) |
((uint64_t)cmd_group_num);
uint64_t cmd_param2 =
((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) |
((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group);
uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) |
((uint64_t)cmd_flt_total_batch_num << 32) |
((uint64_t)cmd_flt_N_impl << 16) |
((uint64_t)cmd_flt_pre_batch_num);
uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) |
((uint64_t)cmd_bn_num << 32) |
((uint64_t)cmd_bias_num << 16) |
((uint64_t)cmd_flt_N_len);
uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) |
((uint64_t)cmd_flt_pack_length << 32) |
((uint64_t)cmd_flt_cycle_num_mns1 << 16) |
((uint64_t)cmd_flt_pack_num_per_kernel_mns1);
uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) |
((uint64_t)cmd_ifm_batch_num_mns1 << 32) |
((uint64_t)cmd_ifm_buf_col_len << 16) |
((uint64_t)cmd_ifm_C_impl);
uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) |
((uint64_t)cmd_ifm_buf_col_len_rem << 16) |
((uint64_t)cmd_ofm_height);
uint64_t cmd_param8 =
((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length);
uint64_t cmd_ifm_flt_quant_scale =
(((uint64_t)cmd_filter_quant_scale) << 32) |
((uint64_t)cmd_image_quant_scale);
uint64_t cmd_step_pad_mul_row_len =
((uint64_t)cmd_pad_h_mul_row_byte_len << 32) |
((uint64_t)cmd_step_h_mul_row_byte_len);
//---- ofm paras ----
uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) |
((uint64_t)wParallelsim << 16) |
((uint64_t)win_size);
uint64_t cmd_ofm_addr_width_reg =
((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base);
uint64_t cmd_intra_stride_atoms_reg =
((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride);
uint64_t cmd_ofm_height_batch_reg =
((uint64_t)conv_ofm_buf_col_len_rem << 48) |
((uint64_t)conv_ofm_buf_col_len << 32) |
((uint64_t)conv_ofm_height_batch + 0x80000000);
uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst);
uint64_t cmd_wdma_param_reg =
((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) |
((uint64_t)conv_ofm_dma_offset);
uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) |
((cmd_init_raddr_col_0 & 0xffff) << 32) |
(((cmd_init_raddr_index & 0xffff) << 16)) |
(cmd_init_raddr_flag & 0xffff) << 15 |
((cmd_init_raddr_cnt & 0xffff));
uint64_t cmd_para31 = (cmd_para31 & 0x1) | args.relu_enabled;
DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1;
DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0;
DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; //
DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt;
DLOG << "conv_ofm_height_batch = " << conv_ofm_height_batch;
DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr;
DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr;
DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim;
DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size;
DLOG << "cmd_param1 = " << hex << cmd_param1;
DLOG << "cmd_param2 = " << hex << cmd_param2;
DLOG << "cmd_param3 = " << hex << cmd_param3;
DLOG << "cmd_param4 = " << hex << cmd_param4;
DLOG << "cmd_param5 = " << hex << cmd_param5;
DLOG << "cmd_param6 = " << hex << cmd_param6;
DLOG << "cmd_param7 = " << hex << cmd_param7;
DLOG << "cmd_param8 = " << hex << cmd_param8;
DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale;
DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len;
DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length;
DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg;
DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg;
DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg;
DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg;
DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg;
DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg;
DLOG << "cmd_para31 = " << hex << cmd_para31;
reg_writeq(cmd_ifm_flt_base_addr, MUL8(1));
reg_writeq(cmd_scale_base_addr, MUL8(2));
reg_writeq(cmd_ifm_flt_dim, MUL8(3));
reg_writeq(cmd_pad_step_size, MUL8(4));
reg_writeq(cmd_param1, MUL8(5));
reg_writeq(cmd_param2, MUL8(6));
reg_writeq(cmd_param3, MUL8(7));
reg_writeq(cmd_param4, MUL8(8));
reg_writeq(cmd_param5, MUL8(9));
reg_writeq(cmd_param6, MUL8(10));
reg_writeq(cmd_param7, MUL8(11));
reg_writeq(cmd_param8, MUL8(12));
reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13));
reg_writeq(cmd_step_pad_mul_row_len, MUL8(14));
reg_writeq(cmd_ifm_pack_byte_length, MUL8(15));
reg_writeq(cmd_conv_param_reg, MUL8(16));
reg_writeq(cmd_ofm_addr_width_reg, MUL8(17));
reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18));
reg_writeq(cmd_init_raddr_reg, MUL8(29));
reg_writeq(cmd_para31, MUL8(31));
reg_writeq(0, MUL8(19));
reg_writeq(cmd_ofm_height_batch_reg, MUL8(19));
reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19));
reg_writeq(cmd_wdma_param_reg, MUL8(25));
reg_writeq(0, MUL8(0));
reg_writeq(0x4000000000000000, MUL8(0));
ret = fpga_regpoll(MUL8(48), CONV_DONE, 0xffffff);
if (ret == -1) {
DLOG << "fpga conv no interrupt!!";
return ret;
}
reg_readq(MUL8(63));
usleep(10);
float scale = Findfp16Max();
(args.output.scale_address)[0] = scale; // NOLINT
(args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT
DLOG << "Findfp16Max scale = " << scale;
DLOG << "ret=" << ret;
return ret;
}
int ComputeFpgaPool(const struct PoolingArgs &args) {
......@@ -97,7 +577,6 @@ int ComputeFpgaPool(const struct PoolingArgs &args) {
DLOG << " mode:" << args.mode
<< " kernel_reciprocal:" << fp16_2_fp32(args.kernel_reciprocal);
DLOG << " image_address:" << args.image.address
<< " image_scale_address:" << args.image.scale_address
<< " image_channels:" << args.image.channels
<< " image_height:" << args.image.height
<< " image_width:" << args.image.width
......@@ -107,13 +586,467 @@ int ComputeFpgaPool(const struct PoolingArgs &args) {
<< " kernel_width:" << args.kernel.width
<< " stride_h:" << args.kernel.stride_h
<< " stride_w:" << args.kernel.stride_w;
DLOG << " out_address:" << args.output.address
<< " out_scale_address:" << args.output.scale_address;
DLOG << " out_address:" << args.output.address;
#endif
#ifndef PADDLE_MOBILE_ZU5
return 0;
#endif
return 0;
uint32_t filter_num_align = 0;
filter_num_align = args.image.channels;
DLOG << "______db_______: begin to set registers. ";
uint64_t ifm_pixel_num =
((args.image.width) * (args.image.height) * args.image.channels);
uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT
uint64_t flt_pixel_num = 0;
uint64_t filter_memory_size = 0;
//!! ???
uint64_t bn_pixel_num = (filter_num_align * 2);
uint64_t bn_memory_size = bn_pixel_num * sizeof(uint16_t);
uint64_t ofm_width =
((args.image.width) + 2 * args.image.pad_width - args.kernel.width) /
(args.kernel.stride_w) +
1;
uint64_t ofm_height = ((args.image.height) + 2 * (args.image.pad_height) -
(args.kernel.height)) /
(args.kernel.stride_h) +
1;
uint32_t filter_num = filter_num_align;
uint32_t image_channels = args.image.channels;
uint64_t ifm_src_paddr = vaddr_to_paddr((args.image.address));
uint64_t flt_src_paddr = 0;
uint64_t sb_src_paddr = 0;
uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address));
/**********BN******************/
float image_inv_scale = 0;
float filter_inv_scale = 0;
int idx = 0;
DLOG << "______db_______: reset registers. ";
reg_writeq(1, MUL8(24));
usleep(1);
reg_writeq(0, MUL8(24));
/*********configuring registers*************/
uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr;
uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr;
uint32_t cmd_scale_base_addr = (uint32_t)sb_src_paddr;
uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr;
uint64_t cmd_group_num = 1; // args.group_num;
uint64_t cmd_filter_per_group = filter_num / cmd_group_num;
uint64_t cmd_flt_sqr_len = (args.kernel.width) * (args.kernel.height);
uint64_t cmd_ifm_pre_row_num = args.kernel.height;
if ((args.kernel.height == args.image.height) &&
(0 == args.image.pad_height)) {
cmd_ifm_pre_row_num = (args.kernel.height);
} else {
cmd_ifm_pre_row_num =
(args.kernel.height) - (args.image.pad_height) + (args.kernel.stride_h);
}
uint64_t cmd_flt_pre_batch_num = 1;
uint64_t cmd_ifm_pack_num_per_row_mns1 =
(uint64_t)(((args.image.channels) + 63) / 64) - 1;
uint64_t cmd_bn_num = filter_num;
uint64_t cmd_bias_num = filter_num;
uint64_t cmd_ifm_stride_row_length = args.image.width * args.kernel.stride_h;
uint64_t cmd_flt_pack_num_per_kernel_mns1 =
(uint64_t)(((args.image.channels) + 63) / 64) - 1;
uint64_t cmd_ofm_width_mns1 = (uint64_t)(
((args.image.width) - (args.kernel.width) + 2 * (args.image.pad_width)) /
(args.kernel.stride_w));
uint64_t cmd_ofm_height =
(uint64_t)(((args.image.height) - (args.kernel.height) +
2 * (args.image.pad_height)) /
(args.kernel.stride_h)) +
1;
uint64_t cmd_channel_num = 0;
uint64_t cmd_ifm_pack_len = 0;
uint64_t cmd_channel_per_group = 0;
uint64_t cmd_flt_batch_num_mns1 = 0;
uint64_t cmd_flt_N_impl = 8;
uint64_t cmd_ifm_C_impl = 16;
uint64_t cmd_flt_pack_length = 0;
uint64_t cmd_step_h_mul_row_byte_len = 0;
uint64_t cmd_pad_h_mul_row_byte_len = 0;
uint64_t cmd_ifm_pack_byte_length = 16 * ((((args.image.width) + 7) / 8) * 8);
uint64_t row_len_align = args.image.width;
uint64_t cmd_flt_cycle_num_mns1 = 0;
if (image_channels > 32) {
cmd_channel_num = (uint64_t)((((args.image.channels) + 63)) / 64) * 64;
cmd_ifm_pack_len = 64 * (args.image.width);
cmd_channel_per_group = 64;
cmd_flt_batch_num_mns1 = (uint64_t)(((filter_num + 7)) / 8 - 1);
cmd_flt_N_impl = 8;
cmd_ifm_C_impl = 64;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 64;
cmd_step_h_mul_row_byte_len =
(args.kernel.stride_h) * cmd_channel_num * args.image.width;
cmd_pad_h_mul_row_byte_len =
(args.image.pad_height) * cmd_channel_num * args.image.width;
cmd_ifm_pack_byte_length = 64 * args.image.width;
row_len_align = args.image.width * (cmd_ifm_pack_num_per_row_mns1 + 1);
cmd_flt_cycle_num_mns1 = (cmd_channel_num / 64) - 1;
} else if (image_channels > 16) {
cmd_channel_num = 32;
cmd_ifm_pack_len = 32 * (args.image.width);
cmd_channel_per_group = 32;
cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1);
cmd_flt_N_impl = 16;
cmd_ifm_C_impl = 32;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 32;
cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num *
((((args.image.width) + 1)) / 2) * 2;
cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num *
((((args.image.width) + 1)) / 2) * 2;
cmd_ifm_pack_byte_length =
32 * (uint64_t)((((args.image.width) + 1)) / 2) * 2;
row_len_align = (uint64_t)((((args.image.width) + 1)) / 2);
cmd_flt_cycle_num_mns1 = 0;
} else if (image_channels > 8) {
cmd_channel_num = 16;
cmd_ifm_pack_len = 16 * (args.image.width);
cmd_channel_per_group = 16;
cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1);
cmd_flt_N_impl = 32;
cmd_ifm_C_impl = 16;
cmd_flt_pack_length = (args.kernel.width) * (args.kernel.height) * 16;
cmd_step_h_mul_row_byte_len = (args.kernel.stride_h) * cmd_channel_num *
((((args.image.width) + 3)) / 4) * 4;
cmd_pad_h_mul_row_byte_len = (args.image.pad_height) * cmd_channel_num *
((((args.image.width) + 3)) / 4) * 4;
cmd_ifm_pack_byte_length =
16 * (uint64_t)((((args.image.width) + 3)) / 4) * 4;
row_len_align = (uint64_t)((((args.image.width) + 3)) / 4);
cmd_flt_cycle_num_mns1 = 0;
}
cmd_flt_N_impl = 16;
cmd_flt_batch_num_mns1 = 0;
cmd_flt_pack_length = 64;
uint64_t cmd_flt_N_len = 0;
uint64_t cmd_flt_length = 64;
uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image.width);
uint64_t cmd_ifm_buf_col_len = 0;
uint64_t ifm_one_batch_len =
(1048576 / ((args.image.width) * cmd_channel_num));
uint64_t cmd_ifm_batch_num_tmp = (uint64_t)(
((args.image.height) + ifm_one_batch_len - 1) / ifm_one_batch_len);
if (1 == cmd_ifm_batch_num_tmp) {
cmd_ifm_buf_col_len = args.image.height;
} else {
if (((args.image.height) / (cmd_ifm_batch_num_tmp) % 2) == 0) {
cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp;
} else {
cmd_ifm_buf_col_len = (args.image.height) / cmd_ifm_batch_num_tmp - 1;
}
}
uint64_t cmd_ifm_batch_num_mns1 =
(((args.image.height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) -
1;
uint64_t cmd_flt_total_batch_num = 1;
uint64_t cmd_ifm_buf_col_len_rem =
(args.image.height) -
cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len; //= -4;
//-------- ofm batch number reg && initial URAM reading address
uint64_t cmd_init_raddr_cnt = 1;
uint64_t cmd_init_raddr_flag = 0;
int64_t cmd_init_raddr_index = -8;
int64_t cmd_init_raddr_col_0 = -4;
int64_t cmd_init_raddr_col_1 = -4;
int64_t conv_ofm_buf_col_len = 0;
int64_t conv_ofm_buf_col_len_rem = 0;
if (((args.image.pad_height) % (2 * (args.kernel.stride_h))) == 0) {
cmd_init_raddr_cnt = 0;
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (((args.image.pad_height) + 1) / 2);
cmd_init_raddr_col_0 = cmd_init_raddr_index;
cmd_init_raddr_col_1 = cmd_init_raddr_index;
} else if (((args.image.pad_height) -
2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <=
(args.kernel.stride_h)) {
cmd_init_raddr_cnt =
(args.kernel.stride_h) -
((args.image.pad_height) -
((args.image.pad_height) / (2 * (args.kernel.stride_h))));
cmd_init_raddr_flag = 1;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * args.kernel.stride_h));
cmd_init_raddr_col_0 =
0 - (int64_t)row_len_align * (int64_t)(args.image.pad_height) -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * (args.kernel.stride_h)));
cmd_init_raddr_col_1 =
cmd_init_raddr_col_0 + args.kernel.stride_h * (int64_t)row_len_align;
} else if (((args.image.pad_height) -
2 * ((args.image.pad_height) / (2 * (args.kernel.stride_h)))) <=
2 * (args.kernel.stride_h)) {
cmd_init_raddr_cnt =
2 * (args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h))) -
(args.image.pad_height);
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h)));
cmd_init_raddr_col_0 =
0 -
(int64_t)row_len_align *
((args.image.pad_height) / (2 * (args.kernel.stride_h))) -
(int64_t)row_len_align *
(2 * (args.kernel.stride_h) *
(((args.image.pad_height) + 2 * (args.kernel.stride_h) - 1) /
(2 * (args.kernel.stride_h))) -
(args.image.pad_height));
cmd_init_raddr_col_1 = cmd_init_raddr_col_0;
}
if (cmd_ifm_batch_num_mns1 == 0) {
if ((args.kernel.height) <= (args.kernel.stride_h)) {
conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) -
3 * (args.kernel.stride_h);
} else {
conv_ofm_buf_col_len = (args.image.height) + 2 * (args.image.pad_height) -
2 * (args.kernel.stride_h) - (args.kernel.height);
}
conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len;
} else {
int N_rem = 0;
int row_rem = 0;
if ((args.kernel.height) <= (args.kernel.stride_h)) {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (args.kernel.stride_h);
N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) /
(args.kernel.stride_h) +
1;
row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem;
conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem +
2 * (args.image.pad_height) + row_rem -
3 * (args.kernel.stride_h);
} else {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (args.image.pad_height) -
2 * (args.kernel.stride_h) - (args.kernel.height);
N_rem = (cmd_ifm_buf_col_len - (args.kernel.height)) /
(args.kernel.stride_h) +
1;
row_rem = cmd_ifm_buf_col_len - (args.kernel.stride_h) * N_rem;
conv_ofm_buf_col_len_rem =
cmd_ifm_buf_col_len_rem + (args.image.pad_height) + row_rem -
2 * (args.kernel.stride_h) - (args.kernel.height);
}
}
//----------------------- para functions --------------------------------
uint64_t cmd_filter_quant_scale = 0x3c00;
uint64_t cmd_image_quant_scale = 0x3c00;
uint64_t wParallelsim = cmd_ifm_C_impl >> 3;
uint64_t wParallelsim_num = cmd_flt_cycle_num_mns1;
uint64_t win_size = (args.kernel.width) * (args.kernel.height) *
(cmd_ifm_pack_num_per_row_mns1 + 1) -
1; //
uint64_t conv_ofm_width = (((args.image.width) - (args.kernel.width) +
(args.image.pad_width) + (args.image.pad_width)) /
(args.kernel.stride_w));
uint64_t conv_ofm_dma_length = cmd_channel_num * sizeof(short); // NOLINT
uint64_t conv_ofm_dma_stride = conv_ofm_dma_length;
uint64_t conv_ofm_height_batch_tmp =
(args.image.height + 2 * args.image.pad_height - args.kernel.height) /
args.kernel.stride_h +
1;
uint64_t conv_ofm_height_batch = (conv_ofm_height_batch_tmp + 1) / 2 - 1;
uint64_t o_ust_rst = 0;
uint64_t conv_ofm_dma_repeat =
(uint64_t)(((((args.image.width) - (args.kernel.width) +
(args.image.pad_width) + (args.image.pad_width))) /
(args.kernel.stride_w)) +
1);
uint64_t conv_ofm_dma_offset =
args.image.channels * conv_ofm_dma_repeat * sizeof(short); // NOLINT
uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2;
//----------------- register contation ------------------
uint64_t cmd_ifm_flt_base_addr = ((uint64_t)cmd_filter_vir_base_addr << 32) |
((uint64_t)cmd_image_vir_base_addr);
uint64_t cmd_ifm_flt_dim = ((uint64_t)(args.kernel.height) << 48) |
((uint64_t)(args.kernel.width) << 32) |
((uint64_t)(args.image.height) << 16) |
((uint64_t)(args.image.width));
uint64_t cmd_pad_step_size = ((uint64_t)(args.kernel.stride_h) << 48) |
((uint64_t)(args.kernel.stride_w) << 32) |
((uint64_t)(args.image.pad_height) << 16) |
((uint64_t)(args.image.pad_width));
uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) |
((uint64_t)cmd_channel_num << 32) |
((uint64_t)filter_num << 16) |
((uint64_t)cmd_group_num);
uint64_t cmd_param2 =
((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) |
((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group);
uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) |
((uint64_t)cmd_flt_total_batch_num << 32) |
((uint64_t)cmd_flt_N_impl << 16) |
((uint64_t)cmd_flt_pre_batch_num);
uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) |
((uint64_t)cmd_bn_num << 32) |
((uint64_t)cmd_bias_num << 16) |
((uint64_t)cmd_flt_N_len);
uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) |
((uint64_t)cmd_flt_pack_length << 32) |
((uint64_t)cmd_flt_cycle_num_mns1 << 16) |
((uint64_t)cmd_flt_pack_num_per_kernel_mns1);
uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) |
((uint64_t)cmd_ifm_batch_num_mns1 << 32) |
((uint64_t)cmd_ifm_buf_col_len << 16) |
((uint64_t)cmd_ifm_C_impl);
uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) |
((uint64_t)cmd_ifm_buf_col_len_rem << 16) |
((uint64_t)cmd_ofm_height);
uint64_t cmd_param8 =
((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length);
uint64_t cmd_ifm_flt_quant_scale = ((uint64_t)cmd_filter_quant_scale << 32) |
((uint64_t)cmd_image_quant_scale);
uint64_t cmd_step_pad_mul_row_len =
((uint64_t)cmd_pad_h_mul_row_byte_len << 32) |
((uint64_t)cmd_step_h_mul_row_byte_len);
//---- ofm paras ----
uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) |
((uint64_t)wParallelsim << 16) |
((uint64_t)win_size);
uint64_t cmd_ofm_addr_width_reg =
((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base);
uint64_t cmd_intra_stride_atoms_reg =
((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride);
uint64_t cmd_ofm_height_batch_reg =
((uint64_t)(conv_ofm_buf_col_len_rem & 0xffff) << 48) |
((uint64_t)(conv_ofm_buf_col_len & 0xffff) << 32) |
((uint64_t)conv_ofm_height_batch + 0x80000000);
uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst);
uint64_t cmd_wdma_param_reg =
((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) |
((uint64_t)conv_ofm_dma_offset);
uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) |
((cmd_init_raddr_col_0 & 0xffff) << 32) |
(((cmd_init_raddr_index & 0xffff) << 16)) |
(cmd_init_raddr_flag & 0xffff) << 15 |
((cmd_init_raddr_cnt & 0xffff));
DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1;
DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0;
DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; //
DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt;
DLOG << "conv_ofm_buf_col_len = " << hex << conv_ofm_buf_col_len;
DLOG << "conv_ofm_buf_col_len_rem = " << hex << conv_ofm_buf_col_len_rem;
DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr;
DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr;
DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim;
DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size;
DLOG << "cmd_param1 = " << hex << cmd_param1;
DLOG << "cmd_param2 = " << hex << cmd_param2;
DLOG << "cmd_param3 = " << hex << cmd_param3;
DLOG << "cmd_param4 = " << hex << cmd_param4;
DLOG << "cmd_param5 = " << hex << cmd_param5;
DLOG << "cmd_param6 = " << hex << cmd_param6;
DLOG << "cmd_param7 = " << hex << cmd_param7;
DLOG << "cmd_param8 = " << hex << cmd_param8;
DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale;
DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len;
DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length;
DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg;
DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg;
DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg;
DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg;
DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg;
DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg;
DLOG << "pooling_mode = " << hex << args.mode;
reg_writeq(cmd_ifm_flt_base_addr, MUL8(1));
reg_writeq(cmd_scale_base_addr, MUL8(2));
reg_writeq(cmd_ifm_flt_dim, MUL8(3));
reg_writeq(cmd_pad_step_size, MUL8(4));
reg_writeq(cmd_param1, MUL8(5));
reg_writeq(cmd_param2, MUL8(6));
reg_writeq(cmd_param3, MUL8(7));
reg_writeq(cmd_param4, MUL8(8));
reg_writeq(cmd_param5, MUL8(9));
reg_writeq(cmd_param6, MUL8(10));
reg_writeq(cmd_param7, MUL8(11));
reg_writeq(cmd_param8, MUL8(12));
reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13));
reg_writeq(cmd_step_pad_mul_row_len, MUL8(14));
reg_writeq(cmd_ifm_pack_byte_length, MUL8(15));
reg_writeq(cmd_conv_param_reg, MUL8(16));
reg_writeq(cmd_ofm_addr_width_reg, MUL8(17));
reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18));
reg_writeq(cmd_init_raddr_reg, MUL8(29));
reg_writeq(0, MUL8(19));
reg_writeq(cmd_ofm_height_batch_reg, MUL8(19));
reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19));
reg_writeq(cmd_wdma_param_reg, MUL8(25));
/******************************************************************/
uint64_t cmd_mult_factor = ((uint64_t)args.kernel_reciprocal) |
((uint64_t)args.kernel_reciprocal << 16);
reg_writeq(cmd_mult_factor, MUL8(30));
/******************************************************************/
reg_writeq(0, MUL8(0));
if (args.mode == 0) { // max pooling
reg_writeq(0x2200000000000000, MUL8(0));
} else { // average pooling
reg_writeq(0x2400000000000000, MUL8(0));
}
int ret = -1;
ret = fpga_regpoll(MUL8(48), CONV_DONE, 0x00ffff);
if (ret == -1) {
DLOG << "fpga pooling no interrupt!!";
return ret;
}
reg_readq(MUL8(63));
usleep(10);
// get max value
float scale = Findfp16Max();
(args.output.scale_address)[0] = scale; // NOLINT
(args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT
DLOG << "Findfp16Max scale = " << scale;
DLOG << "ret=" << ret;
return ret;
}
int get_ofm_batch_size(int width, int channel) {
int pad_channel, row_size;
if (64 < channel) {
pad_channel = (int)((channel + 127) / 128) * 128; // NOLINT
} else if (32 < channel && channel <= 64) {
pad_channel = ((channel + 63) / (64)) * 64;
} else if (16 < channel && channel <= 32) {
pad_channel = ((channel + 31) / (32)) * 32;
} else if (channel <= 16) {
pad_channel = ((channel + 15) / (16)) * 16;
}
row_size = pad_channel * width;
return row_size;
}
int ComputeFpgaEWAdd(const struct EWAddArgs &args) {
......@@ -123,26 +1056,525 @@ int ComputeFpgaEWAdd(const struct EWAddArgs &args) {
<< " const0:" << fp16_2_fp32(int16_t(args.const0))
<< " const1:" << fp16_2_fp32(int16_t(args.const1));
DLOG << " image0_address:" << args.image0.address
<< " image0_scale_address:" << args.image0.scale_address
<< " image0_channels:" << args.image0.channels
<< " image0_height:" << args.image0.height
<< " image0_width:" << args.image0.width
<< " pad0_height:" << args.image0.pad_height
<< " pad0_width:" << args.image0.pad_width;
<< " image0_width:" << args.image0.width;
DLOG << " image1_address:" << args.image1.address
<< " image1_scale_address:" << args.image1.scale_address
<< " image1_channels:" << args.image1.channels
<< " image1_height:" << args.image1.height
<< " image1_width:" << args.image1.width
<< " pad1_height:" << args.image1.pad_height
<< " pad_width:" << args.image1.pad_width;
DLOG << " out_address:" << args.output.address
<< " out_scale_address:" << args.output.scale_address;
<< " image1_width:" << args.image1.width;
DLOG << " out_address:" << args.output.address;
#endif
#ifndef PADDLE_MOBILE_ZU5
return 0;
#endif
return 0;
uint32_t filter_num_align = args.image0.channels;
uint32_t const_kernel_width_1 = 1;
uint32_t const_stride_width_1 = 1;
uint32_t const_kernel_height_2 = 2;
uint32_t const_stride_height_2 = 2;
uint32_t const_pad_height_0 = 0;
uint32_t const_pad_width_0 = 0;
uint32_t ew_image_height = args.image0.height * 2;
DLOG << "______db_______: begin to set registers. ";
uint64_t ifm_pixel_num =
((args.image0.width) * (args.image0.height) * args.image0.channels);
uint64_t ifm_memory_size = ifm_pixel_num * sizeof(short); // NOLINT
uint64_t flt_pixel_num = 0;
uint64_t filter_memory_size = 0;
uint64_t bn_pixel_num = (filter_num_align * 2);
uint64_t bn_memory_size = bn_pixel_num * sizeof(uint16_t);
uint64_t ofm_width =
((args.image0.width) + 2 * const_pad_width_0 - const_kernel_width_1) /
(const_stride_width_1) +
1;
uint64_t ofm_height =
((ew_image_height) + 2 * (const_pad_height_0) - (const_kernel_height_2)) /
(const_stride_height_2) +
1;
uint32_t filter_num = filter_num_align;
uint32_t image_channels = args.image0.channels;
uint64_t ifm_src_paddr = vaddr_to_paddr((args.image0.address));
uint64_t flt_src_paddr = vaddr_to_paddr((args.image1.address));
uint64_t ifm_dst_paddr = vaddr_to_paddr((args.output.address));
float image_inv_scale = 0;
float filter_inv_scale = 0;
int idx = 0;
DLOG << "______db_______: reset registers. ";
reg_writeq(1, MUL8(24));
usleep(1);
reg_writeq(0, MUL8(24));
/*********configuring registers*************/
uint32_t cmd_image_vir_base_addr = (uint32_t)ifm_src_paddr;
uint32_t cmd_filter_vir_base_addr = (uint32_t)flt_src_paddr;
uint32_t cmd_scale_base_addr = 0;
uint32_t conv_ofm_addr_base = (uint32_t)ifm_dst_paddr;
uint64_t cmd_group_num = 1;
uint64_t cmd_filter_per_group = filter_num / cmd_group_num;
uint64_t cmd_flt_sqr_len = (const_kernel_width_1) * (const_kernel_height_2);
uint64_t cmd_ifm_pre_row_num = const_kernel_height_2;
if ((const_kernel_height_2 == ew_image_height) && (0 == const_pad_height_0)) {
cmd_ifm_pre_row_num = (const_kernel_height_2);
} else {
cmd_ifm_pre_row_num = (const_kernel_height_2) - (const_pad_height_0) +
(const_stride_height_2);
}
uint64_t cmd_flt_pre_batch_num = 1;
uint64_t cmd_ifm_pack_num_per_row_mns1 =
(uint64_t)(((args.image0.channels) + 63) / 64) - 1;
uint64_t cmd_bn_num = filter_num;
uint64_t cmd_bias_num = filter_num;
uint64_t cmd_ifm_stride_row_length =
args.image0.width * const_stride_height_2;
uint64_t cmd_flt_pack_num_per_kernel_mns1 =
(uint64_t)(((args.image0.channels) + 63) / 64) - 1;
uint64_t cmd_ofm_width_mns1 = (uint64_t)(
((args.image0.width) - (const_kernel_width_1) + 2 * (const_pad_width_0)) /
(const_stride_width_1));
uint64_t cmd_ofm_height =
(uint64_t)(((args.image0.height) * 2 - (const_kernel_height_2) +
2 * (const_pad_height_0)) /
(const_stride_height_2)) +
1;
uint64_t cmd_channel_num = 0;
uint64_t cmd_ifm_pack_len = 0;
uint64_t cmd_channel_per_group = 0;
uint64_t cmd_flt_batch_num_mns1 = 0;
uint64_t cmd_flt_N_impl = 8;
uint64_t cmd_ifm_C_impl = 16;
uint64_t cmd_flt_pack_length = 0;
uint64_t cmd_step_h_mul_row_byte_len = 0;
uint64_t cmd_pad_h_mul_row_byte_len = 0;
uint64_t cmd_ifm_pack_byte_length =
16 * ((((args.image0.width) + 7) / 8) * 8);
uint64_t row_len_align = args.image0.width;
uint64_t cmd_flt_cycle_num_mns1 = 0;
if (image_channels > 32) {
cmd_channel_num = (uint64_t)((((args.image0.channels) + 63)) / 64) * 64;
cmd_ifm_pack_len = 64 * (args.image0.width);
cmd_channel_per_group = 64;
cmd_flt_batch_num_mns1 = (uint64_t)(((filter_num + 7)) / 8 - 1);
cmd_flt_N_impl = 8;
cmd_ifm_C_impl = 64;
cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*64;
cmd_step_h_mul_row_byte_len =
(const_stride_height_2)*cmd_channel_num * args.image0.width;
cmd_pad_h_mul_row_byte_len =
(const_pad_height_0)*cmd_channel_num * args.image0.width;
cmd_ifm_pack_byte_length = 64 * args.image0.width;
row_len_align = args.image0.width;
cmd_flt_cycle_num_mns1 = (cmd_channel_num / 64) - 1;
} else if (image_channels > 16) {
cmd_channel_num = 32;
cmd_ifm_pack_len = 32 * (args.image0.width);
cmd_channel_per_group = 32;
cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1);
cmd_flt_N_impl = 16;
cmd_ifm_C_impl = 32;
cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*32;
cmd_step_h_mul_row_byte_len = (const_stride_height_2)*cmd_channel_num *
((((args.image0.width) + 1)) / 2) * 2;
cmd_pad_h_mul_row_byte_len = (const_pad_height_0)*cmd_channel_num *
((((args.image0.width) + 1)) / 2) * 2;
cmd_ifm_pack_byte_length =
32 * (uint64_t)((((args.image0.width) + 1)) / 2) * 2;
row_len_align = (uint64_t)((((args.image0.width) + 1)) / 2);
cmd_flt_cycle_num_mns1 = 0;
} else if (image_channels > 8) {
cmd_channel_num = 16;
cmd_ifm_pack_len = 16 * (args.image0.width);
cmd_channel_per_group = 16;
cmd_flt_batch_num_mns1 = (uint64_t)((((filter_num) + 15)) / 16 - 1);
cmd_flt_N_impl = 32;
cmd_ifm_C_impl = 16;
cmd_flt_pack_length = (const_kernel_width_1) * (const_kernel_height_2)*16;
cmd_step_h_mul_row_byte_len = (const_stride_height_2)*cmd_channel_num *
((((args.image0.width) + 3)) / 4) * 4;
cmd_pad_h_mul_row_byte_len = (const_pad_height_0)*cmd_channel_num *
((((args.image0.width) + 3)) / 4) * 4;
cmd_ifm_pack_byte_length =
16 * (uint64_t)((((args.image0.width) + 3)) / 4) * 4;
row_len_align = (uint64_t)((((args.image0.width) + 3)) / 4);
cmd_flt_cycle_num_mns1 = 0;
}
cmd_flt_N_impl = 16;
cmd_flt_batch_num_mns1 = 0;
cmd_flt_pack_length = 64;
uint64_t cmd_flt_N_len = 0;
uint64_t cmd_flt_length = 64;
uint64_t cmd_ifm_row_byte_length = cmd_channel_num * (args.image0.width);
uint64_t cmd_ifm_buf_col_len = 0;
uint64_t ifm_one_batch_len =
(1048576 / ((2 * row_len_align) * cmd_channel_num));
uint64_t cmd_ifm_batch_num_tmp = (uint64_t)(
((ew_image_height) + ifm_one_batch_len - 1) / ifm_one_batch_len);
DLOG << "ifm_one_batch_len = " << hex << ifm_one_batch_len;
DLOG << "cmd_ifm_batch_num_tmp = " << hex << cmd_ifm_batch_num_tmp;
if (1 == cmd_ifm_batch_num_tmp) {
cmd_ifm_buf_col_len = ew_image_height;
} else {
cmd_ifm_buf_col_len = ifm_one_batch_len;
}
uint64_t cmd_ifm_batch_num_mns1 =
(((ew_image_height) + cmd_ifm_buf_col_len - 1) / cmd_ifm_buf_col_len) - 1;
DLOG << "___db____ew____:cmd_ifm_batch_num_mns1 = " << hex
<< cmd_ifm_batch_num_mns1;
uint64_t cmd_flt_total_batch_num = 1;
uint64_t cmd_ifm_buf_col_len_rem =
(ew_image_height)-cmd_ifm_batch_num_mns1 * cmd_ifm_buf_col_len;
//-------- ofm batch number reg && initial URAM reading address
// logic-----------------
uint64_t cmd_init_raddr_cnt = 1;
uint64_t cmd_init_raddr_flag = 0;
int64_t cmd_init_raddr_index = -8;
int64_t cmd_init_raddr_col_0 = -4;
int64_t cmd_init_raddr_col_1 = -4;
int64_t conv_ofm_buf_col_len = 0;
int64_t conv_ofm_buf_col_len_rem = 0;
if (((const_pad_height_0) % (2 * (const_stride_height_2))) == 0) {
cmd_init_raddr_cnt = 0;
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (((const_pad_height_0) + 1) / 2);
cmd_init_raddr_col_0 = cmd_init_raddr_index;
cmd_init_raddr_col_1 = cmd_init_raddr_index;
} else if (((const_pad_height_0)-2 *
((const_pad_height_0) / (2 * (const_stride_height_2)))) <=
(const_stride_height_2)) {
cmd_init_raddr_cnt =
(const_stride_height_2) -
((const_pad_height_0) -
((const_pad_height_0) / (2 * (const_stride_height_2))));
cmd_init_raddr_flag = 1;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(const_pad_height_0) -
(int64_t)row_len_align *
((const_pad_height_0) / (2 * const_stride_height_2));
cmd_init_raddr_col_0 =
0 - (int64_t)row_len_align * (int64_t)(const_pad_height_0) -
(int64_t)row_len_align *
((const_pad_height_0) / (2 * (const_stride_height_2)));
cmd_init_raddr_col_1 =
cmd_init_raddr_col_0 +
const_stride_height_2 * (int64_t)row_len_align; // 0;
} else if (((const_pad_height_0)-2 *
((const_pad_height_0) / (2 * (const_stride_height_2)))) <=
2 * (const_stride_height_2)) {
cmd_init_raddr_cnt =
2 * (const_stride_height_2) *
(((const_pad_height_0) + 2 * (const_stride_height_2)-1) /
(2 * (const_stride_height_2))) -
(const_pad_height_0);
cmd_init_raddr_flag = 0;
cmd_init_raddr_index =
0 - (int64_t)row_len_align * (int64_t)(const_stride_height_2) *
(((const_pad_height_0) + 2 * (const_stride_height_2)-1) /
(2 * (const_stride_height_2)));
cmd_init_raddr_col_0 =
0 -
(int64_t)row_len_align *
((const_pad_height_0) / (2 * (const_stride_height_2))) -
(int64_t)row_len_align *
(2 * (const_stride_height_2) *
(((const_pad_height_0) + 2 * (const_stride_height_2)-1) /
(2 * (const_stride_height_2))) -
(const_pad_height_0));
cmd_init_raddr_col_1 = cmd_init_raddr_col_0;
}
if (cmd_ifm_batch_num_mns1 == 0) {
if ((const_kernel_height_2) <= (const_stride_height_2)) {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len + 2 * (const_pad_height_0)-3 *
(const_stride_height_2);
} else {
conv_ofm_buf_col_len =
cmd_ifm_buf_col_len +
2 * (const_pad_height_0)-3 * (const_stride_height_2) -
(const_kernel_height_2);
}
conv_ofm_buf_col_len_rem = conv_ofm_buf_col_len;
} else {
int N_rem = 0;
int row_rem = 0;
if ((const_kernel_height_2) <= (const_stride_height_2)) {
conv_ofm_buf_col_len = cmd_ifm_buf_col_len - 3 * (const_stride_height_2);
N_rem = (cmd_ifm_buf_col_len - (const_kernel_height_2)) /
(const_stride_height_2) +
1;
row_rem = cmd_ifm_buf_col_len - (const_stride_height_2)*N_rem;
conv_ofm_buf_col_len_rem = cmd_ifm_buf_col_len_rem +
2 * (const_pad_height_0) + row_rem -
3 * (const_stride_height_2);
} else {
conv_ofm_buf_col_len =
cmd_ifm_buf_col_len +
2 * (const_pad_height_0)-3 * (const_stride_height_2) -
(const_kernel_height_2);
N_rem = (cmd_ifm_buf_col_len - (const_kernel_height_2)) /
(const_stride_height_2) +
1;
row_rem = cmd_ifm_buf_col_len - (const_stride_height_2)*N_rem;
conv_ofm_buf_col_len_rem =
cmd_ifm_buf_col_len_rem + (const_pad_height_0) + row_rem -
3 * (const_stride_height_2) - (const_kernel_height_2);
}
}
//*************************
uint64_t ifm_height_raw_batch = 0;
uint64_t cmd_ofm_height_batch_reg;
uint64_t conv_ofm_height_batch_tmp = 0;
uint64_t conv_ofm_height_batch[16];
int ofm_height_norm_batch;
int height_batch_num;
int row_norm_size = get_ofm_batch_size(args.image0.width, cmd_channel_num);
int ifm_norm_size =
ew_image_height * row_norm_size * sizeof(short); // NOLINT
if (ifm_norm_size <= (1024 * 1024)) {
conv_ofm_height_batch[0] =
get_image_out_axis(ew_image_height, const_pad_height_0,
const_kernel_height_2, const_stride_height_2);
height_batch_num = 0;
} else if (row_norm_size < (1024 * 1024)) {
// raw ifm batch ,should make ofm be 2*N
ifm_height_raw_batch =
(int)(((double)(1024 * 1024) - row_norm_size + 1) / // NOLINT
(double)(2 * row_norm_size)); // NOLINT
ofm_height_norm_batch = get_image_out_axis(
ifm_height_raw_batch, 0, const_kernel_height_2, const_stride_height_2);
if (ofm_height_norm_batch % 2 == 0) {
ofm_height_norm_batch = ofm_height_norm_batch;
} else {
ofm_height_norm_batch = ofm_height_norm_batch - 1;
}
DLOG << "ofm_height_norm_batch = " << hex << ofm_height_norm_batch;
int ofm_height_rems = cmd_ofm_height;
int i = 0;
for (i = 0; 0 < ofm_height_rems; i++) {
if (ofm_height_norm_batch <= ofm_height_rems) {
ofm_height_rems = ofm_height_rems - ofm_height_norm_batch;
conv_ofm_height_batch[i] = ofm_height_norm_batch;
DLOG << "ofm_height_norm_batch[i] = " << hex
<< conv_ofm_height_batch[i];
} else {
conv_ofm_height_batch[i] = ofm_height_rems;
break;
}
}
height_batch_num = i;
}
//*************************
//----------------------- para functions --------------------------------
uint64_t cmd_filter_quant_scale = 0x3c00;
uint64_t cmd_image_quant_scale = 0x3c00;
uint64_t wParallelsim = cmd_ifm_C_impl >> 3;
uint64_t wParallelsim_num = cmd_flt_cycle_num_mns1;
uint64_t win_size = (const_kernel_width_1) * (const_kernel_height_2) *
(cmd_ifm_pack_num_per_row_mns1 + 1) -
1; //
uint64_t conv_ofm_width = (((args.image0.width) - (const_kernel_width_1) +
(const_pad_width_0) + (const_pad_width_0)) /
(const_stride_width_1));
uint64_t conv_ofm_dma_length = cmd_channel_num * sizeof(short); // NOLINT
uint64_t conv_ofm_dma_stride = cmd_channel_num * sizeof(short); // NOLINT
uint64_t cmd_image_addr_low = 0;
uint64_t cmd_image_addr_high = 0;
uint64_t cmd_image_addr_diff = 0;
if (cmd_filter_vir_base_addr < cmd_image_vir_base_addr) {
cmd_image_addr_low = (uint64_t)cmd_filter_vir_base_addr;
cmd_image_addr_high = (uint64_t)cmd_image_vir_base_addr;
} else {
cmd_image_addr_low = (uint64_t)cmd_image_vir_base_addr;
cmd_image_addr_high = (uint64_t)cmd_filter_vir_base_addr;
}
cmd_image_addr_diff = cmd_image_addr_high - cmd_image_addr_low;
uint64_t o_ust_rst = 0;
uint64_t conv_ofm_dma_repeat =
(uint64_t)(((((args.image0.width) - (const_kernel_width_1) +
(const_pad_width_0) + (const_pad_width_0))) /
(const_stride_width_1)) +
1);
uint64_t conv_ofm_dma_offset =
cmd_channel_num * conv_ofm_dma_repeat * sizeof(short); // NOLINT
uint64_t conv_ofm_inter_stride = conv_ofm_dma_offset * 2;
//----------------- register contation ------------------
uint64_t cmd_ifm_flt_base_addr =
(cmd_image_addr_high << 32) | (cmd_image_addr_low);
uint64_t cmd_ifm_flt_dim = ((uint64_t)(const_kernel_height_2) << 48) |
((uint64_t)(const_kernel_width_1) << 32) |
((uint64_t)(ew_image_height) << 16) |
((uint64_t)(args.image0.width));
uint64_t cmd_pad_step_size = ((uint64_t)(const_stride_height_2) << 48) |
((uint64_t)(const_stride_width_1) << 32) |
((uint64_t)(const_pad_height_0) << 16) |
((uint64_t)(const_pad_width_0));
uint64_t cmd_param1 = ((uint64_t)cmd_filter_per_group << 48) |
((uint64_t)cmd_channel_num << 32) |
((uint64_t)filter_num << 16) |
((uint64_t)cmd_group_num);
uint64_t cmd_param2 =
((uint64_t)cmd_flt_sqr_len << 48) | ((uint64_t)cmd_ifm_pack_len << 32) |
((uint64_t)cmd_ifm_pre_row_num << 16) | ((uint64_t)cmd_channel_per_group);
uint64_t cmd_param3 = ((uint64_t)cmd_flt_batch_num_mns1 << 48) |
((uint64_t)cmd_flt_total_batch_num << 32) |
((uint64_t)cmd_flt_N_impl << 16) |
((uint64_t)cmd_flt_pre_batch_num);
uint64_t cmd_param4 = ((uint64_t)cmd_ifm_pack_num_per_row_mns1 << 48) |
((uint64_t)cmd_bn_num << 32) |
((uint64_t)cmd_bias_num << 16) |
((uint64_t)cmd_flt_N_len);
uint64_t cmd_param5 = ((uint64_t)cmd_ifm_stride_row_length << 48) |
((uint64_t)cmd_flt_pack_length << 32) |
((uint64_t)cmd_flt_cycle_num_mns1 << 16) |
((uint64_t)cmd_flt_pack_num_per_kernel_mns1);
uint64_t cmd_param6 = ((uint64_t)cmd_ofm_width_mns1 << 48) |
((uint64_t)cmd_ifm_batch_num_mns1 << 32) |
((uint64_t)cmd_ifm_buf_col_len << 16) |
((uint64_t)cmd_ifm_C_impl);
uint64_t cmd_param7 = ((uint64_t)conv_ofm_inter_stride << 32) |
((uint64_t)cmd_ifm_buf_col_len_rem << 16) |
((uint64_t)cmd_ofm_height);
uint64_t cmd_param8 =
((uint64_t)cmd_flt_length << 32) | ((uint64_t)cmd_ifm_row_byte_length);
uint64_t cmd_ifm_flt_quant_scale = ((uint64_t)cmd_filter_quant_scale << 32) |
((uint64_t)cmd_image_quant_scale);
uint64_t cmd_step_pad_mul_row_len =
((uint64_t)cmd_pad_h_mul_row_byte_len << 32) |
((uint64_t)cmd_step_h_mul_row_byte_len);
//---- ofm paras ----
uint64_t cmd_conv_param_reg = ((uint64_t)wParallelsim_num << 32) |
((uint64_t)wParallelsim << 16) |
((uint64_t)win_size);
uint64_t cmd_ofm_addr_width_reg =
((uint64_t)conv_ofm_width << 32) | ((uint64_t)conv_ofm_addr_base);
uint64_t cmd_intra_stride_atoms_reg =
((uint64_t)conv_ofm_dma_length << 32) | ((uint64_t)conv_ofm_dma_stride);
uint64_t cmd_user_ctrl_reg = ((uint64_t)o_ust_rst);
uint64_t cmd_wdma_param_reg =
((uint64_t)(conv_ofm_dma_repeat | 0x80000000) << 32) |
((uint64_t)conv_ofm_dma_offset);
uint64_t cmd_init_raddr_reg = ((cmd_init_raddr_col_1 & 0xffff) << 48) |
((cmd_init_raddr_col_0 & 0xffff) << 32) |
(((cmd_init_raddr_index & 0xffff) << 16)) |
(cmd_init_raddr_flag & 0xffff) << 15 |
((cmd_init_raddr_cnt & 0xffff));
uint64_t cmd_mult_factor =
((uint64_t)args.const0) | ((uint64_t)args.const1 << 16);
uint64_t cmd_para31 = (cmd_para31 & 0x1) | args.relu_enabled;
DLOG << "cmd_init_raddr_col_1 = " << hex << cmd_init_raddr_col_1;
DLOG << "cmd_init_raddr_col_0 = " << hex << cmd_init_raddr_col_0;
DLOG << "cmd_init_raddr_index = " << hex << cmd_init_raddr_index; //
DLOG << "cmd_init_raddr_cnt = " << hex << cmd_init_raddr_cnt;
DLOG << "cmd_ifm_buf_col_len = " << hex << cmd_ifm_buf_col_len;
DLOG << "cmd_ifm_buf_col_len_rem = " << hex << cmd_ifm_buf_col_len_rem;
DLOG << "conv_ofm_buf_col_len = " << hex << conv_ofm_buf_col_len;
DLOG << "conv_ofm_buf_col_len_rem = " << hex << conv_ofm_buf_col_len_rem;
DLOG << "cmd_ifm_flt_base_addr = " << hex << cmd_ifm_flt_base_addr;
DLOG << "cmd_scale_base_addr = " << hex << cmd_scale_base_addr;
DLOG << "cmd_ifm_flt_dim = " << hex << cmd_ifm_flt_dim;
DLOG << "cmd_pad_step_size = " << hex << cmd_pad_step_size;
DLOG << "cmd_param1 = " << hex << cmd_param1;
DLOG << "cmd_param2 = " << hex << cmd_param2;
DLOG << "cmd_param3 = " << hex << cmd_param3;
DLOG << "cmd_param4 = " << hex << cmd_param4;
DLOG << "cmd_param5 = " << hex << cmd_param5;
DLOG << "cmd_param6 = " << hex << cmd_param6;
DLOG << "cmd_param7 = " << hex << cmd_param7;
DLOG << "cmd_param8 = " << hex << cmd_param8;
DLOG << "cmd_ifm_flt_quant_scale = " << hex << cmd_ifm_flt_quant_scale;
DLOG << "cmd_step_pad_mul_row_len = " << hex << cmd_step_pad_mul_row_len;
DLOG << "cmd_ifm_pack_byte_length = " << hex << cmd_ifm_pack_byte_length;
DLOG << "cmd_conv_param_reg = " << hex << cmd_conv_param_reg;
DLOG << "cmd_ofm_addr_width_reg = " << hex << cmd_ofm_addr_width_reg;
DLOG << "cmd_intra_stride_atoms_reg = " << hex << cmd_intra_stride_atoms_reg;
DLOG << "cmd_init_raddr_reg = " << hex << cmd_init_raddr_reg;
DLOG << "cmd_mult_factor = " << hex << cmd_mult_factor;
DLOG << "cmd_wdma_param_reg = " << hex << cmd_wdma_param_reg;
DLOG << "cmd_para31 = " << hex << cmd_para31;
reg_writeq(cmd_ifm_flt_base_addr, MUL8(1));
reg_writeq(cmd_scale_base_addr, MUL8(2));
reg_writeq(cmd_ifm_flt_dim, MUL8(3));
reg_writeq(cmd_pad_step_size, MUL8(4));
reg_writeq(cmd_param1, MUL8(5));
reg_writeq(cmd_param2, MUL8(6));
reg_writeq(cmd_param3, MUL8(7));
reg_writeq(cmd_param4, MUL8(8));
reg_writeq(cmd_param5, MUL8(9));
reg_writeq(cmd_param6, MUL8(10));
reg_writeq(cmd_param7, MUL8(11));
reg_writeq(cmd_param8, MUL8(12));
reg_writeq(cmd_ifm_flt_quant_scale, MUL8(13));
reg_writeq(cmd_step_pad_mul_row_len, MUL8(14));
reg_writeq(cmd_ifm_pack_byte_length, MUL8(15));
reg_writeq(cmd_conv_param_reg, MUL8(16));
reg_writeq(cmd_ofm_addr_width_reg, MUL8(17));
reg_writeq(cmd_intra_stride_atoms_reg, MUL8(18));
reg_writeq(cmd_init_raddr_reg, MUL8(29));
reg_writeq(cmd_para31, MUL8(31));
reg_writeq(0, MUL8(19));
for (int i = 0; i < height_batch_num + 1; i++) {
conv_ofm_height_batch_tmp =
int((conv_ofm_height_batch[i] + 1) / 2) - 1; // NOLINT
cmd_ofm_height_batch_reg =
((uint64_t)(conv_ofm_buf_col_len_rem & 0xffff) << 48) |
((uint64_t)(conv_ofm_buf_col_len & 0xffff) << 32) |
((uint64_t)conv_ofm_height_batch_tmp + 0x80000000);
reg_writeq(cmd_ofm_height_batch_reg, MUL8(19));
reg_writeq(cmd_ofm_height_batch_reg & 0xffffffff00000000, MUL8(19));
usleep(1);
}
reg_writeq(cmd_wdma_param_reg, MUL8(25));
DLOG << "cmd_ofm_height_batch_reg = " << hex << cmd_ofm_height_batch_reg;
/******************************************************************/
reg_writeq(cmd_mult_factor, MUL8(30));
/******************************************************************/
reg_writeq(0, MUL8(0));
reg_writeq(0x2100000000000000, MUL8(0));
int ret = fpga_regpoll(MUL8(48), CONV_DONE, 0xffffff);
if (ret == -1) {
DLOG << "fpga EW no interrupt!!";
return ret;
}
reg_readq(MUL8(63));
usleep(10);
// get max value
float scale = Findfp16Max();
(args.output.scale_address)[0] = scale; // NOLINT
(args.output.scale_address)[1] = (float)(1.0 / scale); // NOLINT
DLOG << "Findfp16Max scale = " << scale;
DLOG << "ret=" << ret;
return ret;
}
int PerformBypass(const struct BypassArgs &args) {
......@@ -166,60 +1598,63 @@ int PerformBypass(const struct BypassArgs &args) {
return 0;
#endif
// uint64_t ifm_src_paddr = driver::vaddr_to_paddr(args.image.address);
// uint64_t ifm_dst_paddr = driver::vaddr_to_paddr(args.output.address);
// uint64_t bp_enable;
// int64_t length;
// uint64_t pixels;
//
// // fp32->fp16
// if ((args.input_data_type) && (!args.output_data_type)) {
// pixels = (args.image.channels) * (args.image.width) *
// (args.image.height); length = pixels * sizeof(float); bp_enable =
// 0x8800000000000000 + length;
// }
// // fp16->fp32
// else if ((!args.input_data_type) && (args.output_data_type)) {
// pixels = filter::calc_aligned_channel((args.image.channels)) *
// (args.image.width) * (args.image.height);
// length = pixels * sizeof(short);
// length = align_to_x((int)length, 64); // NOLINT
// bp_enable = 0x8a00000000000000 + length;
// }
// // fp16->fp16 findmax
// else if ((!args.input_data_type) && (!args.output_data_type)) {
// pixels = (args.image.channels) * (args.image.width) *
// (args.image.height); length = pixels * sizeof(short); bp_enable =
// 0x8900000000000000 + length;
// } else {
// return -1;
// }
//
// // start bypass
// driver::reg_writeq(ifm_src_paddr, MUL8(27));
// driver::reg_writeq(ifm_dst_paddr, MUL8(28));
// driver::reg_writeq(0, MUL8(0));
// driver::reg_writeq(bp_enable, MUL8(0));
// // poll
// int ret = -1;
// ret = driver::fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffffff);
// if (ret != -1) {
// // clear "irq"
// driver::reg_readq(MUL8(63));
// }
// // get max value
// if ((!args.input_data_type) && (!args.output_data_type)) {
// float scale = Findfp16Max();
// args.output.scale_address[0] = (float)(1.0 / scale); // NOLINT
// args.output.scale_address[1] = scale;
// }
// return ret;
uint64_t ifm_src_paddr = vaddr_to_paddr(args.image.address);
uint64_t ifm_dst_paddr = vaddr_to_paddr(args.output.address);
uint64_t bp_enable;
int64_t length;
uint64_t pixels;
// fp32->fp16
if ((args.input_data_type) && (!args.output_data_type)) {
DLOG << "fp32-fp16";
pixels = (args.image.channels) * (args.image.width) * (args.image.height);
length = pixels * sizeof(float);
bp_enable = 0x8800000000000000UL + (uint64_t)length;
}
// fp16->fp32
else if ((!args.input_data_type) && (args.output_data_type)) { // NOLINT
DLOG << "fp16-fp32";
pixels = filter::calc_aligned_channel((args.image.channels)) *
(args.image.width) * (args.image.height);
length = pixels * sizeof(short); // NOLINT
length = align_to_x((int)length, 64); // NOLINT
bp_enable = 0x8a00000000000000UL + length;
}
// fp16->fp16 findmax
else if ((!args.input_data_type) && (!args.output_data_type)) { // NOLINT
DLOG << "16-16";
pixels = (args.image.channels) * (args.image.width) * (args.image.height);
length = pixels * sizeof(short); // NOLINT
bp_enable = 0x8900000000000000 + length;
} else {
return -1;
}
// start bypass
reg_writeq(0, MUL8(0));
reg_writeq(ifm_src_paddr, MUL8(27));
reg_writeq(ifm_dst_paddr, MUL8(28));
reg_writeq(bp_enable, MUL8(0));
int ret = -1;
ret = fpga_regpoll(MUL8(48), BYPASS_DONE, 0xffffff);
if (ret != -1) {
DLOG << "test done";
}
reg_readq(MUL8(63));
usleep(10);
// get max value
float scale = Findfp16Max();
args.output.scale_address[0] = scale; // NOLINT
args.output.scale_address[1] = (float)(1.0 / scale); // NOLINT
DLOG << "ret=" << ret;
return ret;
}
int ComputeFPGAConcat(const struct ConcatArgs &args) {
#ifdef FPGA_PRINT_MODE
DLOG << "=============ComputeFpgaConcat===========";
DLOG << " Image_num: " << args.image_num
<< " out_address:" << args.image_out
<< " out_scale_address:" << args.scale_out
<< " out_channel:" << args.out_channel;
......
......@@ -113,6 +113,12 @@ int fpga_invalidate(void *address, size_t size) {
return 0;
#endif
}
uint64_t vaddr_to_paddr(void *address) {
#ifdef PADDLE_MOBILE_ZU5
return driver::vaddr_to_paddr(address);
#else
return 0;
#endif
}
} // namespace fpga
} // namespace paddle_mobile
......@@ -197,21 +197,21 @@ void QuantizeKernel<CPU, float>::Compute(const QuantizeParam<CPU> &param) {
}
max_abs = std::max(max_abs, 1e-6f);
param.online_scale_->mutable_data<float>()[0] = max_abs;
// switch (param.round_type_) {
// case ROUND_NEAREST_TO_EVEN:
// Quantize<ROUND_NEAREST_TO_EVEN>(input, scale, output);
// break;
// case ROUND_NEAREST_TOWARDS_ZERO:
// Quantize<ROUND_NEAREST_TOWARDS_ZERO>(input, scale, output);
// break;
// case ROUND_NEAREST_AWAY_ZERO:
// Quantize<ROUND_NEAREST_AWAY_ZERO>(input, scale, output);
// break;
// default:
// LOG(kLOG_ERROR) << "round type is not supported.";
// break;
// }
Quantize<ROUND_NEAREST_AWAY_ZERO>(input, max_abs, param.offline_, output);
switch (param.round_type_) {
case ROUND_NEAREST_TO_EVEN:
Quantize<ROUND_NEAREST_TO_EVEN>(input, max_abs, param.offline_, output);
break;
case ROUND_NEAREST_TOWARDS_ZERO:
Quantize<ROUND_NEAREST_TOWARDS_ZERO>(input, max_abs, param.offline_,
output);
break;
case ROUND_NEAREST_AWAY_ZERO:
Quantize<ROUND_NEAREST_AWAY_ZERO>(input, max_abs, param.offline_, output);
break;
default:
LOG(kLOG_ERROR) << "round type is not supported.";
break;
}
}
} // namespace operators
......
......@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "operators/kernel/feed_kernel.h"
#include "fpga/V2/filter.h"
namespace paddle_mobile {
namespace operators {
......@@ -24,7 +24,6 @@ bool FeedKernel<FPGA, float>::Init(FeedParam<FPGA> *param) {
fpga::format_fp16_ofm(output, aligned_channel);
return true;
}
template <>
void FeedKernel<FPGA, float>::Compute(const FeedParam<FPGA> &param) {
auto input =
......@@ -33,6 +32,9 @@ void FeedKernel<FPGA, float>::Compute(const FeedParam<FPGA> &param) {
auto input_ptr = input->data<float>();
Tensor *output = param.Out();
auto output_ptr = output->data<float>();
auto channel = input->dims()[1];
uint32_t aligned_channels =
fpga::filter::calc_aligned_channel((int)channel); // NOLINT
fpga::BypassArgs args = {fpga::DATA_TYPE_FP32};
......@@ -41,7 +43,7 @@ void FeedKernel<FPGA, float>::Compute(const FeedParam<FPGA> &param) {
args.input_layout_type = fpga::LAYOUT_CHW;
args.output_layout_type = fpga::LAYOUT_HWC;
args.image.address = reinterpret_cast<void *>(input_ptr);
args.image.channels = (uint32_t)input->dims()[1];
args.image.channels = aligned_channels;
args.image.height = (uint32_t)input->dims()[2];
args.image.width = (uint32_t)input->dims()[3];
args.image.pad_height = 0;
......
......@@ -25,7 +25,7 @@ bool SoftmaxKernel<FPGA, float>::Init(SoftmaxParam<FPGA> *param) {
auto input_ptr = input->data<float>();
auto float_input = new Tensor;
float_input->mutable_data<float>({1, input->dims()[1]});
fpga::format_fp32_ofm(float_input, 8);
fpga::format_fp32_ofm(float_input, 1024);
fpga::BypassArgs args = {fpga::DATA_TYPE_FP16};
args.input_layout_type = fpga::LAYOUT_HWC;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册