Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
吃玉米的猫
models
提交
57c0bf10
M
models
项目概览
吃玉米的猫
/
models
与 Fork 源项目一致
Fork自
PaddlePaddle / models
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
57c0bf10
编写于
5月 14, 2020
作者:
K
Kaipeng Deng
提交者:
GitHub
5月 14, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fluid.layers.data -> fluid.data. test=develop (#4621)
上级
1cb6a643
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
37 addition
and
37 deletion
+37
-37
PaddleCV/3d_vision/PointNet++/ext_op/pointnet_lib.py
PaddleCV/3d_vision/PointNet++/ext_op/pointnet_lib.py
+12
-12
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_farthest_point_sampling_op.py
...ointNet++/ext_op/tests/test_farthest_point_sampling_op.py
+2
-2
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_gather_point_op.py
...3d_vision/PointNet++/ext_op/tests/test_gather_point_op.py
+4
-4
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_group_points_op.py
...3d_vision/PointNet++/ext_op/tests/test_group_points_op.py
+4
-4
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_query_ball_op.py
...V/3d_vision/PointNet++/ext_op/tests/test_query_ball_op.py
+4
-4
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_three_interp_op.py
...3d_vision/PointNet++/ext_op/tests/test_three_interp_op.py
+6
-6
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_three_nn_op.py
...eCV/3d_vision/PointNet++/ext_op/tests/test_three_nn_op.py
+4
-4
PaddleCV/3d_vision/PointRCNN/utils/proposal_utils.py
PaddleCV/3d_vision/PointRCNN/utils/proposal_utils.py
+1
-1
未找到文件。
PaddleCV/3d_vision/PointNet++/ext_op/pointnet_lib.py
浏览文件 @
57c0bf10
...
...
@@ -53,8 +53,8 @@ def three_nn(input, known, eps=1e-10, name=None):
.. code-block:: python
import paddle.fluid as fluid
x = fluid.
layers.data(name='x', shape=[
16, 3], dtype='float32')
known = fluid.
layers.data(name='known', shape=[
32, 3], dtype='float32')
x = fluid.
data(name='x', shape=[None,
16, 3], dtype='float32')
known = fluid.
data(name='known', shape=[None,
32, 3], dtype='float32')
distance, idx = fluid.layers.three_nn(input, known)
"""
helper
=
LayerHelper
(
'three_nn'
,
**
locals
())
...
...
@@ -97,9 +97,9 @@ def three_interp(input, weight, idx, name=None):
.. code-block:: python
import paddle.fluid as fluid
x = fluid.
layers.data(name='x', shape=[
16, 3], dtype='float32')
weight = fluid.
layers.data(name='weight', shape=[
32, 3], dtype='float32')
index = fluid.
layers.data(name='index', shape=[
32, 3], dtype='int32')
x = fluid.
data(name='x', shape=[None,
16, 3], dtype='float32')
weight = fluid.
data(name='weight', shape=[None,
32, 3], dtype='float32')
index = fluid.
data(name='index', shape=[None,
32, 3], dtype='int32')
out = fluid.layers.three_interp(x, weight, index)
"""
helper
=
LayerHelper
(
'three_interp'
,
**
locals
())
...
...
@@ -132,8 +132,8 @@ def query_ball(input, new_points, radius, n_sample):
.. code-block::python
import paddle.fluid as fluid
x = fluid.
layers.data(name='points',shape=[-1
,5,3],dtype='float32')
new_points = fluid.
layers.data(name='new_points', shape=[-1
,2,3], dtype='float32')
x = fluid.
data(name='points',shape=[None
,5,3],dtype='float32')
new_points = fluid.
data(name='new_points', shape=[None
,2,3], dtype='float32')
output = fluid.layers.query_ball(x,new_points,radius=4.0,n_sample=5)
...
...
@@ -167,7 +167,7 @@ def farthest_point_sampling(input, sampled_point_num):
Examples:
.. code-block:: python
x = fluid.
layers.data(name='data', shape=(2,100,
3), dtype='float32')
x = fluid.
data(name='data', shape=(None ,100,
3), dtype='float32')
sampled_points = fluid.layers.farthest_point_sampling(
x, 50
)
...
...
@@ -210,8 +210,8 @@ def gather_point(input, index):
Examples:
.. code-block:: python
import paddle.fluid as fluid
x = fluid.
layers.data(name='x', shape=[-1
, 5, 3], dtype='float32')
index = fluid.
layers.data(name='index', shape=[-1
, 1], dtype='int32')
x = fluid.
data(name='x', shape=[None
, 5, 3], dtype='float32')
index = fluid.
data(name='index', shape=[None
, 1], dtype='int32')
output = fluid.layers.gather_point(x, index)
"""
...
...
@@ -249,8 +249,8 @@ def group_points(input, idx, name=None):
.. code-block:: python
import paddle.fluid as fluid
x = fluid.
layers.data(name='x', shape=[
16, 3], dtype='float32')
index = fluid.
layers.data(name='index', shape=[
32, 3], dtype='int32')
x = fluid.
data(name='x', shape=[None,
16, 3], dtype='float32')
index = fluid.
data(name='index', shape=[None,
32, 3], dtype='int32')
out = fluid.layers.group_points(x, index)
"""
helper
=
LayerHelper
(
'group_points'
,
**
locals
())
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_farthest_point_sampling_op.py
浏览文件 @
57c0bf10
...
...
@@ -44,8 +44,8 @@ class TestFarthestPointSamplingOp(unittest.TestCase):
x_type
=
'float32'
sampled_point_num
=
256
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
,
append_batch_size
=
False
)
x
=
fluid
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
)
y
=
pointnet_lib
.
farthest_point_sampling
(
x
,
sampled_point_num
)
x_np
=
np
.
random
.
randint
(
1
,
100
,
(
x_shape
[
0
]
*
x_shape
[
1
]
*
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_gather_point_op.py
浏览文件 @
57c0bf10
...
...
@@ -35,10 +35,10 @@ class TestGatherPointOp(unittest.TestCase):
idx_shape
=
(
1
,
32
)
idx_type
=
'int32'
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
,
append_batch_size
=
False
)
idx
=
fluid
.
layers
.
data
(
name
=
'idx'
,
shape
=
idx_shape
,
dtype
=
idx_type
,
append_batch_size
=
False
)
x
=
fluid
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
)
idx
=
fluid
.
data
(
name
=
'idx'
,
shape
=
idx_shape
,
dtype
=
idx_type
)
y
=
pointnet_lib
.
gather_point
(
x
,
idx
)
x_np
=
np
.
random
.
uniform
(
-
10
,
10
,
x_shape
).
astype
(
x_type
)
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_group_points_op.py
浏览文件 @
57c0bf10
...
...
@@ -39,10 +39,10 @@ class TestGroupPointsOp(unittest.TestCase):
idx_shape
=
[
8
,
37
,
41
]
idx_type
=
'int32'
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
,
append_batch_size
=
False
)
idx
=
fluid
.
layers
.
data
(
name
=
'idx'
,
shape
=
idx_shape
,
dtype
=
idx_type
,
append_batch_size
=
False
)
x
=
fluid
.
data
(
name
=
'x'
,
shape
=
x_shape
,
dtype
=
x_type
)
idx
=
fluid
.
data
(
name
=
'idx'
,
shape
=
idx_shape
,
dtype
=
idx_type
)
y
=
pointnet_lib
.
group_points
(
x
,
idx
)
x_np
=
np
.
random
.
uniform
(
-
10
,
10
,
x_shape
).
astype
(
x_type
)
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_query_ball_op.py
浏览文件 @
57c0bf10
...
...
@@ -48,10 +48,10 @@ class TestQueryBallOp(unittest.TestCase):
radius
=
6
nsample
=
5
points
=
fluid
.
layers
.
data
(
name
=
'points'
,
shape
=
points_shape
,
dtype
=
points_type
,
append_batch_size
=
False
)
new_points
=
fluid
.
layers
.
data
(
name
=
'new_points'
,
shape
=
new_points_shape
,
dtype
=
points_type
,
append_batch_size
=
False
)
points
=
fluid
.
data
(
name
=
'points'
,
shape
=
points_shape
,
dtype
=
points_type
)
new_points
=
fluid
.
data
(
name
=
'new_points'
,
shape
=
new_points_shape
,
dtype
=
points_type
)
y
=
pointnet_lib
.
query_ball
(
points
,
new_points
,
radius
,
nsample
)
points_np
=
np
.
random
.
randint
(
1
,
5
,
points_shape
).
astype
(
points_type
)
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_three_interp_op.py
浏览文件 @
57c0bf10
...
...
@@ -42,12 +42,12 @@ class TestThreeInterpOp(unittest.TestCase):
weight_shape
=
[
8
,
37
,
3
]
weight_type
=
'float32'
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
input_shape
,
dtype
=
input_type
,
append_batch_size
=
False
)
weight
=
fluid
.
layers
.
data
(
name
=
'weight'
,
shape
=
weight_shape
,
dtype
=
weight_type
,
append_batch_size
=
False
)
idx
=
fluid
.
layers
.
data
(
name
=
'idx'
,
shape
=
weight_shape
,
dtype
=
"int32"
,
append_batch_size
=
False
)
x
=
fluid
.
data
(
name
=
'x'
,
shape
=
input_shape
,
dtype
=
input_type
)
weight
=
fluid
.
data
(
name
=
'weight'
,
shape
=
weight_shape
,
dtype
=
weight_type
)
idx
=
fluid
.
data
(
name
=
'idx'
,
shape
=
weight_shape
,
dtype
=
"int32"
)
y
=
pointnet_lib
.
three_interp
(
x
,
weight
,
idx
)
x_np
=
np
.
random
.
random
(
input_shape
).
astype
(
input_type
)
...
...
PaddleCV/3d_vision/PointNet++/ext_op/tests/test_three_nn_op.py
浏览文件 @
57c0bf10
...
...
@@ -57,10 +57,10 @@ class TestThreeNNOp(unittest.TestCase):
input_type
=
'float32'
eps
=
1e-10
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
input_shape
,
dtype
=
input_type
,
append_batch_size
=
False
)
known
=
fluid
.
layers
.
data
(
name
=
'known'
,
shape
=
known_shape
,
dtype
=
input_type
,
append_batch_size
=
False
)
x
=
fluid
.
data
(
name
=
'x'
,
shape
=
input_shape
,
dtype
=
input_type
)
known
=
fluid
.
data
(
name
=
'known'
,
shape
=
known_shape
,
dtype
=
input_type
)
dist
,
idx
=
pointnet_lib
.
three_nn
(
x
,
known
,
eps
)
x_np
=
np
.
random
.
random
(
input_shape
).
astype
(
input_type
)
...
...
PaddleCV/3d_vision/PointRCNN/utils/proposal_utils.py
浏览文件 @
57c0bf10
...
...
@@ -257,7 +257,7 @@ if __name__ == "__main__":
# cfg.RPN.NMS_TYPE = 'rotate'
proposal_func
=
get_proposal_func
(
cfg
)
x
=
fluid
.
layers
.
data
(
name
=
"x"
,
shape
=
[
256
,
84
],
dtype
=
'float32'
)
x
=
fluid
.
data
(
name
=
"x"
,
shape
=
[
None
,
256
,
84
],
dtype
=
'float32'
)
proposal
=
fluid
.
default_main_program
().
current_block
().
create_var
(
name
=
"proposal"
,
dtype
=
'float32'
,
shape
=
[
256
,
7
])
fluid
.
layers
.
py_func
(
proposal_func
,
x
,
proposal
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录