Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野马c
Mace
提交
29b97706
Mace
项目概览
野马c
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
29b97706
编写于
10月 30, 2017
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor new_operator_def to NewOperatorDef
上级
de44231f
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
41 addition
and
41 deletion
+41
-41
mace/ops/addn_benchmark.cc
mace/ops/addn_benchmark.cc
+1
-1
mace/ops/addn_test.cc
mace/ops/addn_test.cc
+1
-1
mace/ops/batch_norm_benchmark.cc
mace/ops/batch_norm_benchmark.cc
+1
-1
mace/ops/batch_norm_test.cc
mace/ops/batch_norm_test.cc
+5
-5
mace/ops/channel_shuffle_benchmark.cc
mace/ops/channel_shuffle_benchmark.cc
+1
-1
mace/ops/channel_shuffle_test.cc
mace/ops/channel_shuffle_test.cc
+1
-1
mace/ops/concat_benchmark.cc
mace/ops/concat_benchmark.cc
+1
-1
mace/ops/concat_test.cc
mace/ops/concat_test.cc
+3
-3
mace/ops/conv_2d_benchmark.cc
mace/ops/conv_2d_benchmark.cc
+1
-1
mace/ops/conv_2d_test.cc
mace/ops/conv_2d_test.cc
+6
-6
mace/ops/depthwise_conv2d_test.cc
mace/ops/depthwise_conv2d_test.cc
+2
-2
mace/ops/depthwise_conv_2d_benchmark.cc
mace/ops/depthwise_conv_2d_benchmark.cc
+1
-1
mace/ops/global_avg_pooling_benchmark.cc
mace/ops/global_avg_pooling_benchmark.cc
+1
-1
mace/ops/global_avg_pooling_test.cc
mace/ops/global_avg_pooling_test.cc
+2
-2
mace/ops/ops_test_util.h
mace/ops/ops_test_util.h
+1
-1
mace/ops/pooling_benchmark.cc
mace/ops/pooling_benchmark.cc
+1
-1
mace/ops/pooling_test.cc
mace/ops/pooling_test.cc
+7
-7
mace/ops/relu_benchmark.cc
mace/ops/relu_benchmark.cc
+1
-1
mace/ops/relu_test.cc
mace/ops/relu_test.cc
+2
-2
mace/ops/resize_bilinear_test.cc
mace/ops/resize_bilinear_test.cc
+2
-2
未找到文件。
mace/ops/addn_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -17,7 +17,7 @@ static void AddNBenchmark(int iters, int n, int size) {
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
op_def_builder
.
Input
(
internal
::
MakeString
(
"Input"
,
i
).
c_str
());
}
op_def_builder
.
Output
(
"Output"
).
Finalize
(
net
.
new_operator_d
ef
());
op_def_builder
.
Output
(
"Output"
).
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
...
...
mace/ops/addn_test.cc
浏览文件 @
29b97706
...
...
@@ -17,7 +17,7 @@ TEST_F(AddnOpTest, AddnOp) {
.
Input
(
"Input2"
)
.
Input
(
"Input3"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input1"
,
{
1
,
2
,
3
,
4
});
...
...
mace/ops/batch_norm_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -21,7 +21,7 @@ static void BatchNorm(
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
D
,
T
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/batch_norm_test.cc
浏览文件 @
29b97706
...
...
@@ -21,7 +21,7 @@ void Simple() {
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
D
,
float
>
(
"Input"
,
{
1
,
1
,
6
,
2
},
...
...
@@ -73,7 +73,7 @@ TEST_F(BatchNormOpTest, SimpleRandomNeon) {
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
@@ -114,7 +114,7 @@ TEST_F(BatchNormOpTest, ComplexRandomNeon) {
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
@@ -155,7 +155,7 @@ TEST_F(BatchNormOpTest, SimpleRandomOPENCL) {
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
OPENCL
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
@@ -201,7 +201,7 @@ TEST_F(BatchNormOpTest, ComplexRandomOPENCL) {
.
Input
(
"Var"
)
.
Input
(
"Epsilon"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
OPENCL
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/channel_shuffle_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -20,7 +20,7 @@ static void ChannelShuffle(
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
AddIntArg
(
"group"
,
group
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/channel_shuffle_test.cc
浏览文件 @
29b97706
...
...
@@ -15,7 +15,7 @@ TEST_F(ChannelShuffleOpTest, C8G4) {
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
AddIntArg
(
"group"
,
4
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
...
...
mace/ops/concat_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -17,7 +17,7 @@ static void ConcatHelper(int iters, int concat_dim, int dim1) {
.
Input
(
"Input1"
)
.
Input
(
"Axis"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
const
int
kDim0
=
100
;
...
...
mace/ops/concat_test.cc
浏览文件 @
29b97706
...
...
@@ -18,7 +18,7 @@ TEST_F(ConcatOpTest, Simple_Horizon) {
.
Input
(
"Input1"
)
.
Input
(
"Axis"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
std
::
vector
<
index_t
>
input_shape
=
{
4
,
4
};
std
::
vector
<
float
>
input0
;
...
...
@@ -56,7 +56,7 @@ TEST_F(ConcatOpTest, Simple_Vertical) {
.
Input
(
"Input1"
)
.
Input
(
"Axis"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
std
::
vector
<
index_t
>
input_shape
=
{
4
,
4
};
std
::
vector
<
float
>
input0
;
...
...
@@ -99,7 +99,7 @@ TEST_F(ConcatOpTest, Random) {
for
(
int
i
=
0
;
i
<
num_inputs
;
++
i
)
{
builder
=
builder
.
Input
((
"Input"
+
ToString
(
i
)).
c_str
());
}
builder
.
Input
(
"Axis"
).
Output
(
"Output"
).
Finalize
(
net
.
new_operator_d
ef
());
builder
.
Input
(
"Axis"
).
Output
(
"Output"
).
Finalize
(
net
.
NewOperatorD
ef
());
std
::
vector
<
index_t
>
shape_data
;
GenerateRandomIntTypeData
<
index_t
>
({
dim
},
shape_data
,
1
,
dim
);
...
...
mace/ops/conv_2d_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -35,7 +35,7 @@ static void Conv2d(int iters,
.
AddIntsArg
(
"strides"
,
{
stride
,
stride
})
.
AddIntArg
(
"padding"
,
padding
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
D
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/conv_2d_test.cc
浏览文件 @
29b97706
...
...
@@ -21,7 +21,7 @@ TEST_F(Conv2dOpTest, Simple_VALID) {
.
AddIntsArg
(
"strides"
,
{
1
,
1
})
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add args
...
...
@@ -55,7 +55,7 @@ TEST_F(Conv2dOpTest, Simple_SAME) {
.
AddIntsArg
(
"strides"
,
{
1
,
1
})
.
AddIntArg
(
"padding"
,
Padding
::
SAME
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -89,7 +89,7 @@ TEST_F(Conv2dOpTest, Combined) {
.
AddIntsArg
(
"strides"
,
{
2
,
2
})
.
AddIntArg
(
"padding"
,
Padding
::
SAME
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -126,7 +126,7 @@ void TestConv1x1() {
.
AddIntsArg
(
"strides"
,
{
1
,
1
})
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
D
,
float
>
(
...
...
@@ -187,7 +187,7 @@ TEST_F(Conv2dOpTest, AlignedConvNxNS12) {
.
AddIntsArg
(
"strides"
,
{
stride_h
,
stride_w
})
.
AddIntArg
(
"padding"
,
type
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
input_channels
,
height
,
width
});
...
...
@@ -236,7 +236,7 @@ TEST_F(Conv2dOpTest, UnalignedConvNxNS12) {
.
AddIntsArg
(
"strides"
,
{
stride_h
,
stride_w
})
.
AddIntArg
(
"padding"
,
type
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
input_channels
,
height
,
width
});
...
...
mace/ops/depthwise_conv2d_test.cc
浏览文件 @
29b97706
...
...
@@ -22,7 +22,7 @@ void SimpleValidTest() {
.
AddIntsArg
(
"strides"
,
{
1
,
1
})
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
D
,
float
>
(
"Input"
,
{
1
,
2
,
2
,
3
},
...
...
@@ -69,7 +69,7 @@ void TestNxNS12(const index_t height, const index_t width) {
.
AddIntsArg
(
"strides"
,
{
stride_h
,
stride_w
})
.
AddIntArg
(
"padding"
,
type
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
D
,
float
>
(
"Input"
,
{
batch
,
input_channels
,
height
,
width
});
...
...
mace/ops/depthwise_conv_2d_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -33,7 +33,7 @@ static void DepthwiseConv2d(int iters,
.
AddIntsArg
(
"strides"
,
{
stride
,
stride
})
.
AddIntArg
(
"padding"
,
padding
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
D
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/global_avg_pooling_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -19,7 +19,7 @@ static void GlobalAvgPooling(
OpDefBuilder
(
"GlobalAvgPooling"
,
"GlobalAvgPoolingTest"
)
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/global_avg_pooling_test.cc
浏览文件 @
29b97706
...
...
@@ -14,7 +14,7 @@ TEST_F(GlobalAvgPoolingOpTest, 3x7x7_CPU) {
OpDefBuilder
(
"GlobalAvgPooling"
,
"GlobalAvgPoolingTest"
)
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
std
::
vector
<
float
>
input
(
147
);
...
...
@@ -38,7 +38,7 @@ TEST_F(GlobalAvgPoolingOpTest, 3x7x7_NEON) {
OpDefBuilder
(
"GlobalAvgPooling"
,
"GlobalAvgPoolingTest"
)
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
std
::
vector
<
float
>
input
(
147
);
...
...
mace/ops/ops_test_util.h
浏览文件 @
29b97706
...
...
@@ -138,7 +138,7 @@ class OpsTestNet {
});
}
OperatorDef
*
new_operator_d
ef
()
{
OperatorDef
*
NewOperatorD
ef
()
{
op_defs_
.
emplace_back
(
OperatorDef
());
return
&
op_defs_
[
op_defs_
.
size
()
-
1
];
}
...
...
mace/ops/pooling_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -32,7 +32,7 @@ static void Pooling(int iters,
.
AddIntsArg
(
"strides"
,
{
stride
,
stride
})
.
AddIntArg
(
"padding"
,
padding
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
batch
,
channels
,
height
,
width
});
...
...
mace/ops/pooling_test.cc
浏览文件 @
29b97706
...
...
@@ -24,7 +24,7 @@ TEST_F(PoolingOpTest, MAX_VALID) {
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
AddIntArg
(
"pooling_type"
,
PoolingType
::
MAX
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -53,7 +53,7 @@ TEST_F(PoolingOpTest, AVG_VALID) {
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
AddIntArg
(
"pooling_type"
,
PoolingType
::
AVG
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -82,7 +82,7 @@ TEST_F(PoolingOpTest, MAX_SAME) {
.
AddIntArg
(
"padding"
,
Padding
::
SAME
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
AddIntArg
(
"pooling_type"
,
PoolingType
::
MAX
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
1
,
1
,
3
,
3
},
...
...
@@ -108,7 +108,7 @@ TEST_F(PoolingOpTest, MAX_VALID_DILATION) {
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
2
,
2
})
.
AddIntArg
(
"pooling_type"
,
PoolingType
::
MAX
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -135,7 +135,7 @@ TEST_F(PoolingOpTest, MAX_k2x2s2x2) {
.
AddIntsArg
(
"strides"
,
{
2
,
2
})
.
AddIntArg
(
"padding"
,
Padding
::
SAME
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -161,7 +161,7 @@ TEST_F(PoolingOpTest, MAX_k3x3s2x2) {
.
AddIntsArg
(
"strides"
,
{
2
,
2
})
.
AddIntArg
(
"padding"
,
Padding
::
VALID
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
@@ -188,7 +188,7 @@ TEST_F(PoolingOpTest, AVG_k2x2s2x2) {
.
AddIntsArg
(
"strides"
,
{
2
,
2
})
.
AddIntArg
(
"padding"
,
Padding
::
SAME
)
.
AddIntsArg
(
"dilations"
,
{
1
,
1
})
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddInputFromArray
<
DeviceType
::
CPU
,
float
>
(
...
...
mace/ops/relu_benchmark.cc
浏览文件 @
29b97706
...
...
@@ -16,7 +16,7 @@ static void ReluBenchmark(int iters, int size) {
OpDefBuilder
(
"Relu"
,
"ReluBM"
)
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
size
});
...
...
mace/ops/relu_test.cc
浏览文件 @
29b97706
...
...
@@ -15,7 +15,7 @@ TEST_F(ReluOpTest, ReluOp) {
OpDefBuilder
(
"Relu"
,
"ReluTest"
)
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
1
,
2
,
3
,
5
});
...
...
@@ -39,7 +39,7 @@ TEST_F(ReluOpTest, ReluOpWithMax) {
.
Input
(
"Input"
)
.
Output
(
"Output"
)
.
AddFloatArg
(
"max_limit"
,
0.5
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
net
.
AddRandomInput
<
DeviceType
::
CPU
,
float
>
(
"Input"
,
{
1
,
2
,
3
,
5
});
...
...
mace/ops/resize_bilinear_test.cc
浏览文件 @
29b97706
...
...
@@ -18,7 +18,7 @@ TEST_F(ResizeBilinearTest, ResizeBilinearWOAlignCorners) {
.
Input
(
"Input"
)
.
Input
(
"OutSize"
)
.
Output
(
"Output"
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
vector
<
float
>
input
(
24
);
...
...
@@ -44,7 +44,7 @@ TEST_F(ResizeBilinearTest, ResizeBilinearWAlignCorners) {
.
Input
(
"OutSize"
)
.
Output
(
"Output"
)
.
AddIntArg
(
"align_corners"
,
1
)
.
Finalize
(
net
.
new_operator_d
ef
());
.
Finalize
(
net
.
NewOperatorD
ef
());
// Add input data
vector
<
float
>
input
(
24
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录