Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
1f3a70ab
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看板
未验证
提交
1f3a70ab
编写于
11月 21, 2018
作者:
Z
zhangyang0701
提交者:
GitHub
11月 21, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1302 from qnqinan/develop
add densebox test file
上级
81f6ec29
92c1c227
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
57 addition
and
2 deletion
+57
-2
CMakeLists.txt
CMakeLists.txt
+1
-1
src/fpga/V2/pe.cpp
src/fpga/V2/pe.cpp
+1
-1
test/CMakeLists.txt
test/CMakeLists.txt
+6
-0
test/fpga/test_densebox_combine.cpp
test/fpga/test_densebox_combine.cpp
+49
-0
未找到文件。
CMakeLists.txt
浏览文件 @
1f3a70ab
...
...
@@ -213,7 +213,7 @@ else()
set
(
NET
"default"
CACHE STRING
"select net type"
)
endif
()
set_property
(
CACHE NET PROPERTY STRINGS
"default"
"googlenet"
"mobilenet"
"yolo"
"squeezenet"
"FPGA
nets
"
"NLP"
)
set_property
(
CACHE NET PROPERTY STRINGS
"default"
"googlenet"
"mobilenet"
"yolo"
"squeezenet"
"FPGA
_NET_V1"
"FPGA_NET_V2
"
"NLP"
)
include
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/tools/op.cmake"
)
...
...
src/fpga/V2/pe.cpp
浏览文件 @
1f3a70ab
...
...
@@ -213,7 +213,7 @@ int PerformBypass(const struct BypassArgs &args) {
// args.output.scale_address[0] = (float)(1.0 / scale); // NOLINT
// args.output.scale_address[1] = scale;
// }
return
ret
;
//
return ret;
}
int
ComputeFPGAConcat
(
const
struct
ConcatArgs
&
args
)
{
...
...
test/CMakeLists.txt
浏览文件 @
1f3a70ab
...
...
@@ -67,6 +67,9 @@ if (CON GREATER -1)
ADD_EXECUTABLE
(
test-resnet50 fpga/test_resnet50.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-resnet50 paddle-mobile
)
ADD_EXECUTABLE
(
test-densebox fpga/test_densebox_combine.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-densebox paddle-mobile
)
set
(
FOUND_MATCH ON
)
endif
()
...
...
@@ -78,6 +81,9 @@ if (CON GREATER -1)
ADD_EXECUTABLE
(
test-pe fpga/test_pe.cpp
)
target_link_libraries
(
test-pe paddle-mobile
)
ADD_EXECUTABLE
(
test-densebox fpga/test_densebox_combine.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-densebox paddle-mobile
)
set
(
FOUND_MATCH ON
)
endif
()
...
...
test/fpga/test_densebox_combine.cpp
0 → 100644
浏览文件 @
1f3a70ab
/* 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.
See the License for the specific language governing permissions and
limitations under the License. */
#include <iostream>
#include "../test_helper.h"
#include "../test_include.h"
#ifdef PADDLE_MOBILE_FPGA_V1
#include "fpga/V1/api.h"
#endif
#ifdef PADDLE_MOBILE_FPGA_V2
#include "fpga/V2/api.h"
#endif
static
const
char
*
g_densebox_combine
=
"../models/densebox"
;
int
main
()
{
paddle_mobile
::
fpga
::
open_device
();
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
FPGA
>
paddle_mobile
;
// paddle_mobile.SetThreadNum(4);
if
(
paddle_mobile
.
Load
(
std
::
string
(
g_densebox_combine
)
+
"/model"
,
std
::
string
(
g_densebox_combine
)
+
"/params"
,
true
))
{
// std::vector<float> input;
// std::vector<int64_t> dims{1, 3, 512, 1024};
// GetInput<float>(g_test_image_1x3x224x224_banana, &input, dims);
// auto vec_result = paddle_mobile.Predict(input, dims);
Tensor
input_tensor
;
SetupTensor
<
float
>
(
&
input_tensor
,
{
1
,
3
,
512
,
1024
},
static_cast
<
float
>
(
0
),
static_cast
<
float
>
(
1
));
// readStream(g_image_src_float,
// input_tensor.mutable_data<float>({1, 3, 224, 224}));
paddle_mobile
.
FeedData
(
input_tensor
);
paddle_mobile
.
Predict_To
(
-
1
);
}
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录