Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
7613918e
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7613918e
编写于
3月 06, 2019
作者:
C
ceci3
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test=develop, change labels name
上级
6fe7478b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
6 deletion
+8
-6
paddle/fluid/API.spec
paddle/fluid/API.spec
+1
-1
python/paddle/fluid/tests/unittests/test_npair_loss_op.py
python/paddle/fluid/tests/unittests/test_npair_loss_op.py
+7
-5
未找到文件。
paddle/fluid/API.spec
浏览文件 @
7613918e
...
@@ -144,7 +144,7 @@ paddle.fluid.layers.label_smooth (ArgSpec(args=['label', 'prior_dist', 'epsilon'
...
@@ -144,7 +144,7 @@ paddle.fluid.layers.label_smooth (ArgSpec(args=['label', 'prior_dist', 'epsilon'
paddle.fluid.layers.roi_pool (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1, 1, 1.0)), ('document', 'c317aa595deb31649083c8faa91cdb97'))
paddle.fluid.layers.roi_pool (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1, 1, 1.0)), ('document', 'c317aa595deb31649083c8faa91cdb97'))
paddle.fluid.layers.roi_align (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale', 'sampling_ratio', 'name'], varargs=None, keywords=None, defaults=(1, 1, 1.0, -1, None)), ('document', '12c5bbb8b38c42e623fbc47611d766e1'))
paddle.fluid.layers.roi_align (ArgSpec(args=['input', 'rois', 'pooled_height', 'pooled_width', 'spatial_scale', 'sampling_ratio', 'name'], varargs=None, keywords=None, defaults=(1, 1, 1.0, -1, None)), ('document', '12c5bbb8b38c42e623fbc47611d766e1'))
paddle.fluid.layers.dice_loss (ArgSpec(args=['input', 'label', 'epsilon'], varargs=None, keywords=None, defaults=(1e-05,)), ('document', '1ba0508d573f65feecf3564dce22aa1d'))
paddle.fluid.layers.dice_loss (ArgSpec(args=['input', 'label', 'epsilon'], varargs=None, keywords=None, defaults=(1e-05,)), ('document', '1ba0508d573f65feecf3564dce22aa1d'))
paddle.fluid.layers.image_resize (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR', None, True, 1)), ('document', '
b3ecb819454832885c1f0f3ab9a5b938
'))
paddle.fluid.layers.image_resize (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'resample', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, 'BILINEAR', None, True, 1)), ('document', '
7a1966d7c3a48f1fc0881cdaf5d83b0b
'))
paddle.fluid.layers.image_resize_short (ArgSpec(args=['input', 'out_short_len', 'resample'], varargs=None, keywords=None, defaults=('BILINEAR',)), ('document', '06211aefc50c5a3e940d7204d859cdf7'))
paddle.fluid.layers.image_resize_short (ArgSpec(args=['input', 'out_short_len', 'resample'], varargs=None, keywords=None, defaults=('BILINEAR',)), ('document', '06211aefc50c5a3e940d7204d859cdf7'))
paddle.fluid.layers.resize_bilinear (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, None, True, 1)), ('document', 'e4fb4ed511b2293b8f04f7e872afbfd7'))
paddle.fluid.layers.resize_bilinear (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners', 'align_mode'], varargs=None, keywords=None, defaults=(None, None, None, None, True, 1)), ('document', 'e4fb4ed511b2293b8f04f7e872afbfd7'))
paddle.fluid.layers.resize_nearest (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners'], varargs=None, keywords=None, defaults=(None, None, None, None, True)), ('document', '735fa9758a6d7ff3b47d7b827f961c1d'))
paddle.fluid.layers.resize_nearest (ArgSpec(args=['input', 'out_shape', 'scale', 'name', 'actual_shape', 'align_corners'], varargs=None, keywords=None, defaults=(None, None, None, None, True)), ('document', '735fa9758a6d7ff3b47d7b827f961c1d'))
...
...
python/paddle/fluid/tests/unittests/test_npair_loss_op.py
浏览文件 @
7613918e
...
@@ -71,10 +71,13 @@ class TestNpairLossOp(unittest.TestCase):
...
@@ -71,10 +71,13 @@ class TestNpairLossOp(unittest.TestCase):
feat_dim
).
astype
(
np
.
float32
)
feat_dim
).
astype
(
np
.
float32
)
embeddings_positive
=
np
.
random
.
rand
(
num_data
,
embeddings_positive
=
np
.
random
.
rand
(
num_data
,
feat_dim
).
astype
(
np
.
float32
)
feat_dim
).
astype
(
np
.
float32
)
labels
=
np
.
random
.
randint
(
row_
labels
=
np
.
random
.
randint
(
0
,
num_classes
,
size
=
(
num_data
)).
astype
(
np
.
float32
)
0
,
num_classes
,
size
=
(
num_data
)).
astype
(
np
.
float32
)
out_loss
=
npairloss
(
out_loss
=
npairloss
(
embeddings_anchor
,
embeddings_positive
,
labels
,
l2_reg
=
reg_lambda
)
embeddings_anchor
,
embeddings_positive
,
row_labels
,
l2_reg
=
reg_lambda
)
anchor_tensor
=
fluid
.
layers
.
data
(
anchor_tensor
=
fluid
.
layers
.
data
(
name
=
'anchor'
,
name
=
'anchor'
,
...
@@ -86,9 +89,8 @@ class TestNpairLossOp(unittest.TestCase):
...
@@ -86,9 +89,8 @@ class TestNpairLossOp(unittest.TestCase):
shape
=
[
num_data
,
feat_dim
],
shape
=
[
num_data
,
feat_dim
],
dtype
=
self
.
dtype
,
dtype
=
self
.
dtype
,
append_batch_size
=
False
)
append_batch_size
=
False
)
rname
=
'labels'
+
str
(
np
.
random
.
rand
()).
split
(
'.'
)[
1
]
labels_tensor
=
fluid
.
layers
.
data
(
labels_tensor
=
fluid
.
layers
.
data
(
name
=
rname
,
name
=
'labels'
,
shape
=
[
num_data
],
shape
=
[
num_data
],
dtype
=
self
.
dtype
,
dtype
=
self
.
dtype
,
append_batch_size
=
False
)
append_batch_size
=
False
)
...
@@ -101,7 +103,7 @@ class TestNpairLossOp(unittest.TestCase):
...
@@ -101,7 +103,7 @@ class TestNpairLossOp(unittest.TestCase):
out_tensor
=
exe
.
run
(
feed
=
{
out_tensor
=
exe
.
run
(
feed
=
{
'anchor'
:
embeddings_anchor
,
'anchor'
:
embeddings_anchor
,
'positive'
:
embeddings_positive
,
'positive'
:
embeddings_positive
,
rname
:
labels
'labels'
:
row_
labels
},
},
fetch_list
=
[
npair_loss_op
.
name
])
fetch_list
=
[
npair_loss_op
.
name
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录