Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
13c9388c
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
13c9388c
编写于
9月 12, 2018
作者:
X
xiaohaichun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add pointer branch
上级
472938cb
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
1455 addition
and
131 deletion
+1455
-131
.gitignore
.gitignore
+219
-0
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
...-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
+944
-98
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
...iaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
metal/paddle-mobile-demo/paddle-mobile-demo/paddle-mobile-demo-Bridging-Header.h
...o/paddle-mobile-demo/paddle-mobile-demo-Bridging-Header.h
+1
-3
metal/paddle-mobile-unit-test/paddle-mobile-unit-test.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
...iaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
...obile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
+3
-3
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/ViewController.swift
...le-unit-test/paddle-mobile-unit-test/ViewController.swift
+3
-3
metal/paddle-mobile/paddle-mobile.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/paddle-mobile.xcscheme
.../xiaohaichun.xcuserdatad/xcschemes/paddle-mobile.xcscheme
+80
-0
metal/paddle-mobile/paddle-mobile.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
...iaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
+14
-0
metal/paddle-mobile/paddle-mobile/Genet.swift
metal/paddle-mobile/paddle-mobile/Genet.swift
+12
-0
metal/paddle-mobile/paddle-mobile/MobileNetSSD.swift
metal/paddle-mobile/paddle-mobile/MobileNetSSD.swift
+12
-0
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
+10
-1
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.h
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.h
+2
-1
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.m
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.m
+35
-10
metal/paddle-mobile/paddle-mobile/Program/Program.swift
metal/paddle-mobile/paddle-mobile/Program/Program.swift
+5
-0
metal/paddle-mobile/paddle-mobile/framework/Loader.swift
metal/paddle-mobile/paddle-mobile/framework/Loader.swift
+86
-12
metal/paddle-mobile/paddle-mobile/paddle_mobile.h
metal/paddle-mobile/paddle-mobile/paddle_mobile.h
+1
-0
未找到文件。
.gitignore
浏览文件 @
13c9388c
...
...
@@ -86,3 +86,222 @@ metal/models/
metal/images/
*.a
metal/paddle-mobile/paddle-mobile/CPU/libpaddle-mobile.a
metal/paddle-mobile-demo/paddle-mobile-demo/images/banana.jpeg
metal/paddle-mobile-demo/paddle-mobile-demo/images/hand.jpg
metal/paddle-mobile-demo/paddle-mobile-demo/images/iphone.JPG
metal/paddle-mobile-demo/paddle-mobile-demo/images/paddle-mobile.png
metal/paddle-mobile-demo/paddle-mobile-demo/images/synset.txt
metal/paddle-mobile-demo/paddle-mobile-demo/models/genet/genet_model
metal/paddle-mobile-demo/paddle-mobile-demo/models/genet/genet_params
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet/model
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet/params
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet_combine/model
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet_combine/params
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet_ssd_hand/ssd_hand_model
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenet_ssd_hand/ssd_hand_params
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/__model__
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_0.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_0.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_0.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_0.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_1.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_1.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_1.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_1.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_10.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_10.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_10.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_10.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_11.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_11.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_11.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_11.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_12.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_12.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_12.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_12.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_13.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_13.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_13.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_13.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_14.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_14.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_14.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_14.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_15.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_15.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_15.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_15.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_16.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_16.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_16.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_16.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_17.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_17.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_17.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_17.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_18.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_18.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_18.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_18.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_19.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_19.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_19.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_19.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_2.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_2.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_2.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_2.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_20.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_20.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_20.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_20.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_21.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_21.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_21.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_21.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_22.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_22.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_22.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_22.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_23.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_23.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_23.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_23.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_24.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_24.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_24.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_24.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_25.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_25.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_25.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_25.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_26.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_26.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_26.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_26.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_27.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_27.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_27.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_27.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_28.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_28.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_28.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_28.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_29.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_29.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_29.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_29.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_3.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_3.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_3.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_3.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_30.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_30.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_30.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_30.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_31.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_31.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_31.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_31.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_32.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_32.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_32.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_32.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_33.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_33.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_33.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_33.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_34.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_34.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_34.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_34.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_4.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_4.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_4.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_4.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_5.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_5.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_5.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_5.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_6.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_6.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_6.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_6.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_7.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_7.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_7.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_7.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_8.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_8.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_8.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_8.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_9.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_9.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_9.w_1
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/batch_norm_9.w_2
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_0.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_1.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_10.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_11.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_12.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_13.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_14.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_15.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_16.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_17.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_18.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_19.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_2.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_20.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_21.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_22.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_22.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_23.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_23.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_24.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_24.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_25.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_25.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_26.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_26.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_27.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_27.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_28.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_28.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_29.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_29.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_3.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_30.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_30.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_31.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_31.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_32.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_32.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_33.b_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_33.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_4.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_5.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_6.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_7.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_8.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/conv2d_9.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_0.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_1.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_10.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_11.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_12.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_2.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_3.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_4.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_5.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_6.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_7.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_8.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/mobilenetssd/depthwise_conv2d_9.w_0
metal/paddle-mobile-demo/paddle-mobile-demo/models/yolo/mobilenet
metal/paddle-mobile-demo/paddle-mobile-demo/models/yolo/model
metal/paddle-mobile-demo/paddle-mobile-demo/models/yolo/params
metal/paddle-mobile-demo/paddle-mobile-demo/models/yolo/yolo
metal/paddle-mobile-demo/paddle-mobile-demo/models/fluid_fssd_new_ar/ar_model
metal/paddle-mobile-demo/paddle-mobile-demo/models/fluid_fssd_new_ar/ar_params
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
浏览文件 @
13c9388c
此差异已折叠。
点击以展开。
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
浏览文件 @
13c9388c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
SchemeUserState
</key>
<dict>
<key>
paddle-mobile-demo.xcscheme
</key>
<dict>
<key>
orderHint
</key>
<integer>
6
</integer>
</dict>
</dict>
</dict>
</plist>
metal/paddle-mobile-demo/paddle-mobile-demo/paddle-mobile-demo-Bridging-Header.h
浏览文件 @
13c9388c
...
...
@@ -2,6 +2,4 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//
//#import <paddle_mobile/>
#import <paddle_mobile/paddle_mobile.h>
metal/paddle-mobile-unit-test/paddle-mobile-unit-test.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
浏览文件 @
13c9388c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
SchemeUserState
</key>
<dict>
<key>
paddle-mobile-unit-test.xcscheme
</key>
<dict>
<key>
orderHint
</key>
<integer>
5
</integer>
</dict>
</dict>
</dict>
</plist>
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/AppDelegate.swift
浏览文件 @
13c9388c
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
...
metal/paddle-mobile-unit-test/paddle-mobile-unit-test/ViewController.swift
浏览文件 @
13c9388c
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
...
metal/paddle-mobile/paddle-mobile.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/paddle-mobile.xcscheme
0 → 100644
浏览文件 @
13c9388c
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"0940"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"FC039B6920E11C3C0081E9F8"
BuildableName =
"paddle_mobile.framework"
BlueprintName =
"paddle-mobile"
ReferencedContainer =
"container:paddle-mobile.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration =
"Release"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
debugServiceExtension =
"internal"
allowLocationSimulation =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"FC039B6920E11C3C0081E9F8"
BuildableName =
"paddle_mobile.framework"
BlueprintName =
"paddle-mobile"
ReferencedContainer =
"container:paddle-mobile.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration =
"Release"
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"FC039B6920E11C3C0081E9F8"
BuildableName =
"paddle_mobile.framework"
BlueprintName =
"paddle-mobile"
ReferencedContainer =
"container:paddle-mobile.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
metal/paddle-mobile/paddle-mobile.xcodeproj/xcuserdata/xiaohaichun.xcuserdatad/xcschemes/xcschememanagement.plist
0 → 100644
浏览文件 @
13c9388c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
SchemeUserState
</key>
<dict>
<key>
paddle-mobile.xcscheme
</key>
<dict>
<key>
orderHint
</key>
<integer>
4
</integer>
</dict>
</dict>
</dict>
</plist>
metal/paddle-mobile/paddle-mobile/Genet.swift
浏览文件 @
13c9388c
...
...
@@ -26,6 +26,18 @@ public class Genet: Net {
preprocessKernel
=
GenetPreProccess
.
init
(
device
:
device
)
dim
=
(
n
:
1
,
h
:
128
,
w
:
128
,
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
=
[
128.0
,
128.0
,
128.0
]
scale
=
0.017
except
=
0
modelPath
=
""
paramPath
=
""
modelDir
=
""
preprocessKernel
=
GenetPreProccess
.
init
(
device
:
device
)
dim
=
(
n
:
1
,
h
:
128
,
w
:
128
,
c
:
3
)
}
class
GenetPreProccess
:
CusomKernel
{
init
(
device
:
MTLDevice
)
{
...
...
metal/paddle-mobile/paddle-mobile/MobileNetSSD.swift
浏览文件 @
13c9388c
...
...
@@ -27,6 +27,18 @@ public class MobileNet_ssd_hand: Net{
dim
=
(
n
:
1
,
h
:
300
,
w
:
300
,
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
=
[
123.68
,
116.78
,
103.94
]
scale
=
0.017
except
=
2
modelPath
=
""
paramPath
=
""
modelDir
=
""
preprocessKernel
=
MobilenetssdPreProccess
.
init
(
device
:
device
)
dim
=
(
n
:
1
,
h
:
300
,
w
:
300
,
c
:
3
)
}
class
MobilenetssdPreProccess
:
CusomKernel
{
init
(
device
:
MTLDevice
)
{
let
s
=
CusomKernel
.
Shape
.
init
(
inWidth
:
300
,
inHeight
:
300
,
inChannel
:
3
)
...
...
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
浏览文件 @
13c9388c
...
...
@@ -42,6 +42,14 @@ public class Net: NSObject {
@objc
public
init
(
device
:
MTLDevice
)
{
super
.
init
()
}
@objc
public
init
(
device
:
MTLDevice
,
paramPointer
:
UnsafeMutableRawPointer
,
paramSize
:
Int
,
modePointer
:
UnsafeMutableRawPointer
,
modelSize
:
Int
)
{
self
.
paramPointer
=
paramPointer
self
.
paramSize
=
paramSize
self
.
modelPointer
=
modePointer
self
.
modelSize
=
modelSize
super
.
init
()
}
}
public
class
Runner
:
NSObject
{
...
...
@@ -93,7 +101,8 @@ public class Runner: NSObject {
}
let
loader
=
Loader
<
Float32
>.
init
()
do
{
program
=
try
loader
.
load
(
device
:
inDevice
,
modelPath
:
net
.
modelPath
,
paraPath
:
net
.
paramPath
)
//program = try loader.load(device: inDevice, modelPath: net.modelPath, paraPath: net.paramPath)
program
=
try
loader
.
load
(
device
:
inDevice
,
paramPointer
:
net
.
paramPointer
!
,
paramSize
:
net
.
paramSize
,
modePointer
:
net
.
modelPointer
!
,
modelSize
:
net
.
modelSize
)
executor
=
try
Executor
<
Float32
>.
init
(
inDevice
:
inDevice
,
inQueue
:
inQueue
,
inProgram
:
program
!
)
}
catch
let
error
{
print
(
error
)
...
...
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.h
浏览文件 @
13c9388c
...
...
@@ -37,6 +37,7 @@ typedef enum : NSUInteger {
*/
@property
(
strong
,
nonatomic
)
NSArray
<
NSNumber
*>
*
dims
;
/*
* 模型参数内存地址
*/
...
...
@@ -83,7 +84,7 @@ typedef enum : NSUInteger {
/*
* 清理内存
*/
-
(
void
)
cl
r
ear
;
-
(
void
)
clear
;
@end
...
...
metal/paddle-mobile/paddle-mobile/PaddleMobileGPU.m
浏览文件 @
13c9388c
...
...
@@ -7,22 +7,47 @@
//
#import <Foundation/Foundation.h>
#import "PaddleMobileGPU.h"
#import "paddle_mobile/paddle_mobile-Swift.h"
#import "paddle_mobile.h"
#import <paddle_mobile/paddle_mobile-Swift.h>
@implementation
ModelConfig
@end
@interface
PaddleMobileGPU
()
{
Runner
*
runner
;
}
@end
@implementation
PaddleMobileGPU
-
(
void
)
clrear
{
// [[ResultHolder alloc] init];
// [[TestClass alloc] init];
// [[TestClass alloc] initWithI:<#(NSInteger)#>]
// ResultHolder;
-
(
instancetype
)
initWithCommandQueue
:(
id
<
MTLCommandQueue
>
)
queue
net
:(
NetType
)
netType
modelConfig
:(
ModelConfig
*
)
config
{
self
=
[
super
init
];
if
(
self
)
{
Net
*
net
=
nil
;
if
(
netType
==
GenetType
)
{
net
=
[[
Genet
alloc
]
initWithDevice
:
queue
.
device
paramPointer
:
config
.
paramPointer
paramSize
:
config
.
paramSize
modePointer
:
config
.
modelPointer
modelSize
:
config
.
modelSize
];
}
else
if
(
netType
==
MobileNetSSDType
)
{
net
=
[[
MobileNet_ssd_hand
alloc
]
initWithDevice
:
queue
.
device
paramPointer
:
config
.
paramPointer
paramSize
:
config
.
paramSize
modePointer
:
config
.
modelPointer
modelSize
:
config
.
modelSize
];
}
else
if
(
netType
==
MobileNetType
)
{
}
runner
=
[[
Runner
alloc
]
initInNet
:
net
commandQueue
:
queue
inPlatform
:
PlatformGPU
];
}
return
self
;
}
@end
-
(
BOOL
)
load
{
return
[
runner
load
];
}
-
(
void
)
predict
:(
id
<
MTLTexture
>
)
texture
withCompletion
:(
void
(
^
)(
BOOL
,
NSArray
<
NSNumber
*>
*
))
completion
{
[
runner
predictWithTexture
:
texture
completion
:
completion
];
}
-
(
void
)
clear
{
[
runner
clear
];
}
@end
metal/paddle-mobile/paddle-mobile/Program/Program.swift
浏览文件 @
13c9388c
...
...
@@ -23,4 +23,9 @@ public struct Program {
paramPath
=
inParamPath
scope
=
inScope
}
init
(
inProgramDesc
:
ProgramDesc
,
inScope
:
Scope
)
{
programDesc
=
inProgramDesc
scope
=
inScope
paramPath
=
""
}
}
metal/paddle-mobile/paddle-mobile/framework/Loader.swift
浏览文件 @
13c9388c
...
...
@@ -93,13 +93,57 @@ public class Loader<P: PrecisionType> {
fclose
(
file
)
}
}
public
init
(){}
public
func
load
(
device
:
MTLDevice
,
modelPath
:
String
,
paraPath
:
String
)
throws
->
Program
{
class
ParaLoaderWithPointer
{
var
paramPointer
:
UnsafeMutableRawPointer
let
paramSize
:
Int
var
nowIndex
:
Int
init
(
pPointer
:
UnsafeMutableRawPointer
,
pSize
:
Int
)
throws
{
paramPointer
=
UnsafeMutableRawPointer
.
init
(
pPointer
)
paramSize
=
pSize
nowIndex
=
0
}
guard
let
modelData
=
try
?
Data
.
init
(
contentsOf
:
URL
.
init
(
fileURLWithPath
:
modelPath
))
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"load "
+
modelPath
+
" failed !"
)
func
read
(
tensor
:
Tensor
<
P
>
)
throws
{
guard
nowIndex
<=
paramSize
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"out of the file range"
)
}
var
readerIndex
:
Int
=
0
func
pointerReader
<
T
>
(
type
:
T
.
Type
)
->
T
{
let
ptr
=
UnsafeMutablePointer
<
T
>.
allocate
(
capacity
:
MemoryLayout
<
T
>.
size
)
memcpy
(
ptr
,
paramPointer
.
advanced
(
by
:
Int
(
readerIndex
)),
MemoryLayout
<
T
>.
size
)
nowIndex
+=
MemoryLayout
<
T
>.
size
readerIndex
+=
MemoryLayout
<
T
>.
size
let
pointee
=
ptr
.
pointee
ptr
.
deinitialize
(
count
:
MemoryLayout
<
UInt32
>.
size
)
ptr
.
deallocate
()
return
pointee
}
let
_
=
pointerReader
(
type
:
UInt32
.
self
)
let
lodLevel
=
pointerReader
(
type
:
UInt64
.
self
)
for
_
in
0
..<
lodLevel
{
let
size
=
pointerReader
(
type
:
UInt64
.
self
)
for
_
in
0
..<
Int
(
size
/
UInt64
(
MemoryLayout
<
size_t
>.
size
)){
_
=
pointerReader
(
type
:
size_t
.
self
)
}
}
let
_
=
pointerReader
(
type
:
UInt32
.
self
)
let
tensorDescSize
=
pointerReader
(
type
:
Int32
.
self
)
paramPointer
=
paramPointer
.
advanced
(
by
:
Int
(
readerIndex
))
paramPointer
=
paramPointer
.
advanced
(
by
:
Int
(
tensorDescSize
))
nowIndex
+=
Int
(
tensorDescSize
)
let
_
=
memcpy
(
tensor
.
data
.
pointer
,
paramPointer
,
tensor
.
data
.
size
)
paramPointer
=
paramPointer
.
advanced
(
by
:
Int
(
tensor
.
data
.
size
))
nowIndex
+=
tensor
.
data
.
size
}
deinit
{
}
}
public
init
(){}
func
loadModelandParam
(
_
device
:
MTLDevice
,
_
modelData
:
Data
,
_
paraLoaderPointer
:
ParaLoaderWithPointer
?,
_
paraLoader
:
ParaLoader
?)
throws
->
Program
{
do
{
let
protoProgram
=
try
PaddleMobile_Framework_Proto_ProgramDesc
.
init
(
serializedData
:
modelData
)
...
...
@@ -108,10 +152,6 @@ public class Loader<P: PrecisionType> {
let
programDesc
=
ProgramOptimize
<
P
>.
init
()
.
optimize
(
originProgramDesc
:
originProgramDesc
)
print
(
programDesc
)
guard
let
paraLoader
=
try
?
ParaLoader
.
init
(
paramPath
:
paraPath
)
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"load para error"
)
}
guard
programDesc
.
blocks
.
count
>
0
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"count of blocks must greater than 0"
)
}
...
...
@@ -155,11 +195,17 @@ public class Loader<P: PrecisionType> {
let
dim
=
Dim
.
init
(
inDim
:
dimArr
)
let
tensor
=
Tensor
<
P
>.
init
(
inDim
:
dim
,
inLayout
:
tensorDesc
.
dataLayout
)
do
{
try
paraLoader
.
read
(
tensor
:
tensor
)
if
paraLoaderPointer
!=
nil
{
try
paraLoaderPointer
!.
read
(
tensor
:
tensor
)
}
if
paraLoader
!=
nil
{
try
paraLoader
!.
read
(
tensor
:
tensor
)
}
}
catch
let
error
{
throw
error
}
// tensor.convert(to: DataLayout.NHWC())
// tensor.convert(to: DataLayout.NHWC())
// tensor.initBuffer(device: device)
scope
[
varDesc
.
name
]
=
tensor
}
else
{
...
...
@@ -175,11 +221,39 @@ public class Loader<P: PrecisionType> {
}
}
let
program
=
Program
.
init
(
inProgramDesc
:
programDesc
,
in
ParamPath
:
paraPath
,
in
Scope
:
scope
)
let
program
=
Program
.
init
(
inProgramDesc
:
programDesc
,
inScope
:
scope
)
return
program
}
catch
_
{
throw
PaddleMobileError
.
loaderError
(
message
:
"protobuf decoder error"
)
}
}
public
func
load
(
device
:
MTLDevice
,
paramPointer
:
UnsafeMutableRawPointer
,
paramSize
:
Int
,
modePointer
:
UnsafeMutableRawPointer
,
modelSize
:
Int
)
throws
->
Program
{
let
modelData
=
Data
.
init
(
bytes
:
modePointer
,
count
:
modelSize
)
guard
let
paraLoader
=
try
?
ParaLoaderWithPointer
.
init
(
pPointer
:
paramPointer
,
pSize
:
paramSize
)
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"load para error"
)
}
do
{
let
program
=
try
loadModelandParam
(
device
,
modelData
,
paraLoader
,
nil
)
return
program
}
catch
let
error
{
throw
error
}
}
public
func
load
(
device
:
MTLDevice
,
modelPath
:
String
,
paraPath
:
String
)
throws
->
Program
{
guard
let
modelData
=
try
?
Data
.
init
(
contentsOf
:
URL
.
init
(
fileURLWithPath
:
modelPath
))
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"load "
+
modelPath
+
" failed !"
)
}
guard
let
paraLoader
=
try
?
ParaLoader
.
init
(
paramPath
:
paraPath
)
else
{
throw
PaddleMobileError
.
loaderError
(
message
:
"load para error"
)
}
do
{
let
program
=
try
loadModelandParam
(
device
,
modelData
,
nil
,
paraLoader
)
return
program
}
catch
let
error
{
throw
error
}
}
}
metal/paddle-mobile/paddle-mobile/paddle_mobile.h
浏览文件 @
13c9388c
...
...
@@ -16,6 +16,7 @@
#import "PaddleMobile.h"
#import "CPUCompute.h"
#import "PaddleMobileGPU.h"
#import <UIKit/UIKit.h>
//! Project version number for paddle_mobile.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录