Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
c9120a30
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看板
提交
c9120a30
编写于
9月 14, 2018
作者:
L
liuruilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
commit
上级
b649ebcd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
62 addition
and
6 deletion
+62
-6
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
...-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
+4
-0
metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard
...mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard
+29
-1
metal/paddle-mobile-demo/paddle-mobile-demo/Multi-Predict-ViewController.swift
...emo/paddle-mobile-demo/Multi-Predict-ViewController.swift
+24
-0
metal/paddle-mobile/paddle-mobile/MobilenetSSD_AR.swift
metal/paddle-mobile/paddle-mobile/MobilenetSSD_AR.swift
+1
-1
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
+1
-1
metal/paddle-mobile/paddle-mobile/framework/Executor.swift
metal/paddle-mobile/paddle-mobile/framework/Executor.swift
+3
-3
未找到文件。
metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj
浏览文件 @
c9120a30
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
FCEBEC2C20E1391F00C0B14D
/* paddle_mobile.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FCEBEC2B20E1391F00C0B14D
/* paddle_mobile.framework */
;
};
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
,
);
};
};
FCEBEC2D20E1391F00C0B14D
/* paddle_mobile.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FCEBEC2B20E1391F00C0B14D
/* paddle_mobile.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
FCEEE7D4210627A000444BEC
/* banana.jpeg in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FCEEE7D3210627A000444BEC
/* banana.jpeg */
;
};
FCEEE7D4210627A000444BEC
/* banana.jpeg in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FCEEE7D3210627A000444BEC
/* banana.jpeg */
;
};
FCF437E8214B6DDB00943429
/* Multi-Predict-ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FCF437E7214B6DDB00943429
/* Multi-Predict-ViewController.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
/* Begin PBXCopyFilesBuildPhase section */
...
@@ -75,6 +76,7 @@
...
@@ -75,6 +76,7 @@
FCDFD41A211D91C7005AB38B
/* synset.txt */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
synset.txt
;
sourceTree
=
"<group>"
;
};
FCDFD41A211D91C7005AB38B
/* synset.txt */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
synset.txt
;
sourceTree
=
"<group>"
;
};
FCEBEC2B20E1391F00C0B14D
/* paddle_mobile.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
paddle_mobile.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
FCEBEC2B20E1391F00C0B14D
/* paddle_mobile.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
paddle_mobile.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
FCEEE7D3210627A000444BEC
/* banana.jpeg */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.jpeg
;
path
=
banana.jpeg
;
sourceTree
=
"<group>"
;
};
FCEEE7D3210627A000444BEC
/* banana.jpeg */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.jpeg
;
path
=
banana.jpeg
;
sourceTree
=
"<group>"
;
};
FCF437E7214B6DDB00943429
/* Multi-Predict-ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Multi-Predict-ViewController.swift"
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -140,6 +142,7 @@
...
@@ -140,6 +142,7 @@
FC039B8A20E11C560081E9F8
/* LaunchScreen.storyboard */
,
FC039B8A20E11C560081E9F8
/* LaunchScreen.storyboard */
,
FC039B8D20E11C560081E9F8
/* Info.plist */
,
FC039B8D20E11C560081E9F8
/* Info.plist */
,
FC27991121343A39000B6BAD
/* paddle-mobile-demo-Bridging-Header.h */
,
FC27991121343A39000B6BAD
/* paddle-mobile-demo-Bridging-Header.h */
,
FCF437E7214B6DDB00943429
/* Multi-Predict-ViewController.swift */
,
);
);
path
=
"paddle-mobile-demo"
;
path
=
"paddle-mobile-demo"
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -343,6 +346,7 @@
...
@@ -343,6 +346,7 @@
files
=
(
files
=
(
FC039B8420E11C550081E9F8
/* ViewController.swift in Sources */
,
FC039B8420E11C550081E9F8
/* ViewController.swift in Sources */
,
FC013928210204A3008100E3
/* PreProcessKernel.metal in Sources */
,
FC013928210204A3008100E3
/* PreProcessKernel.metal in Sources */
,
FCF437E8214B6DDB00943429
/* Multi-Predict-ViewController.swift in Sources */
,
FCBCCC552122EF5500D94F7E
/* MetalHelper.swift in Sources */
,
FCBCCC552122EF5500D94F7E
/* MetalHelper.swift in Sources */
,
FC039B8220E11C550081E9F8
/* AppDelegate.swift in Sources */
,
FC039B8220E11C550081E9F8
/* AppDelegate.swift in Sources */
,
);
);
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard
浏览文件 @
c9120a30
...
@@ -11,6 +11,34 @@
...
@@ -11,6 +11,34 @@
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<scenes>
<scenes>
<!--Multi Predict View Controller-->
<scene
sceneID=
"ec4-AW-9Vs"
>
<objects>
<viewController
id=
"Vwd-lt-764"
customClass=
"Multi_Predict_ViewController"
customModule=
"paddle_mobile_demo"
customModuleProvider=
"target"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"55D-rz-Ex6"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"TQt-X9-PdF"
>
<rect
key=
"frame"
x=
"164"
y=
"318"
width=
"46"
height=
"30"
/>
<state
key=
"normal"
title=
"Button"
/>
<connections>
<action
selector=
"predictAct:"
destination=
"Vwd-lt-764"
eventType=
"touchUpInside"
id=
"d4z-Cv-6jY"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<constraints>
<constraint
firstItem=
"TQt-X9-PdF"
firstAttribute=
"centerY"
secondItem=
"55D-rz-Ex6"
secondAttribute=
"centerY"
id=
"bL3-wr-TcH"
/>
<constraint
firstItem=
"TQt-X9-PdF"
firstAttribute=
"centerX"
secondItem=
"55D-rz-Ex6"
secondAttribute=
"centerX"
id=
"sBi-RQ-sJn"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"bsd-h4-RYZ"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"68E-SG-96s"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"-1438"
y=
"331"
/>
</scene>
<!--View Controller-->
<!--View Controller-->
<scene
sceneID=
"tne-QT-ifu"
>
<scene
sceneID=
"tne-QT-ifu"
>
<objects>
<objects>
...
@@ -199,7 +227,7 @@
...
@@ -199,7 +227,7 @@
</viewController>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
</objects>
</objects>
<point
key=
"canvasLocation"
x=
"-7
24"
y=
"98.50074962518741
"
/>
<point
key=
"canvasLocation"
x=
"-7
19"
y=
"-18
"
/>
</scene>
</scene>
</scenes>
</scenes>
<resources>
<resources>
...
...
metal/paddle-mobile-demo/paddle-mobile-demo/Multi-Predict-ViewController.swift
0 → 100644
浏览文件 @
c9120a30
//
// Multi-Predict-ViewController.swift
// paddle-mobile-demo
//
// Created by liuRuiLong on 2018/9/14.
// Copyright © 2018年 orange. All rights reserved.
//
import
UIKit
import
paddle_mobile
class
Multi_Predict_ViewController
:
UIViewController
{
var
runner1
:
Runner
!
var
runner2
:
Runner
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// let net = MobileNet_ssd_hand.init(device: MetalHelper.shared.device)
// runner1 = Runner.init(inNet: <#T##Net#>, commandQueue: <#T##MTLCommandQueue?#>, inPlatform: <#T##Platform#>)
}
@IBAction
func
predictAct
(
_
sender
:
Any
)
{
}
}
metal/paddle-mobile/paddle-mobile/MobilenetSSD_AR.swift
浏览文件 @
c9120a30
...
@@ -30,7 +30,7 @@ public class MobileNet_ssd_AR: Net{
...
@@ -30,7 +30,7 @@ public class MobileNet_ssd_AR: Net{
class
MobilenetssdPreProccess
:
CusomKernel
{
class
MobilenetssdPreProccess
:
CusomKernel
{
init
(
device
:
MTLDevice
)
{
init
(
device
:
MTLDevice
)
{
let
s
=
CusomKernel
.
Shape
.
init
(
inWidth
:
160
,
inHeight
:
160
,
inChannel
:
3
)
let
s
=
CusomKernel
.
Shape
.
init
(
inWidth
:
160
,
inHeight
:
160
,
inChannel
:
3
)
super
.
init
(
device
:
device
,
inFunctionName
:
"mobilent_ar_preprocess"
,
outputDim
:
s
,
usePaddleMobileLib
:
false
)
super
.
init
(
device
:
device
,
inFunctionName
:
"mobilent_ar_preprocess
_half
"
,
outputDim
:
s
,
usePaddleMobileLib
:
false
)
}
}
}
}
...
...
metal/paddle-mobile/paddle-mobile/PaddleMobile.swift
浏览文件 @
c9120a30
...
@@ -16,7 +16,7 @@ import Foundation
...
@@ -16,7 +16,7 @@ import Foundation
class
ScaleKernel
:
CusomKernel
{
class
ScaleKernel
:
CusomKernel
{
init
(
device
:
MTLDevice
,
shape
:
Shape
)
{
init
(
device
:
MTLDevice
,
shape
:
Shape
)
{
super
.
init
(
device
:
device
,
inFunctionName
:
"scale"
,
outputDim
:
shape
,
usePaddleMobileLib
:
false
)
super
.
init
(
device
:
device
,
inFunctionName
:
"scale
_half
"
,
outputDim
:
shape
,
usePaddleMobileLib
:
false
)
}
}
}
}
...
...
metal/paddle-mobile/paddle-mobile/framework/Executor.swift
浏览文件 @
c9120a30
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
import
Foundation
import
Foundation
let
testTo
=
114
let
testTo
=
2
var
isTest
=
false
var
isTest
=
false
let
computePrecision
:
ComputePrecision
=
.
Float
32
let
computePrecision
:
ComputePrecision
=
.
Float
16
public
class
ResultHolder
{
public
class
ResultHolder
{
public
let
dim
:
[
Int
]
public
let
dim
:
[
Int
]
...
@@ -67,7 +67,7 @@ public class Executor<P: PrecisionType> {
...
@@ -67,7 +67,7 @@ public class Executor<P: PrecisionType> {
queue
=
inQueue
queue
=
inQueue
for
block
in
inProgram
.
programDesc
.
blocks
{
for
block
in
inProgram
.
programDesc
.
blocks
{
//block.ops.count
//block.ops.count
for
i
in
0
..<
block
.
ops
.
count
{
for
i
in
0
..<
testTo
{
let
op
=
block
.
ops
[
i
]
let
op
=
block
.
ops
[
i
]
do
{
do
{
let
op
=
try
OpCreator
<
P
>.
shared
.
creat
(
device
:
inDevice
,
opDesc
:
op
,
scope
:
inProgram
.
scope
)
let
op
=
try
OpCreator
<
P
>.
shared
.
creat
(
device
:
inDevice
,
opDesc
:
op
,
scope
:
inProgram
.
scope
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录