未验证 提交 ea40133c 编写于 作者: K Kaipeng Deng 提交者: GitHub

refine pointnet doc (#4017)

上级 541b2293
......@@ -56,7 +56,7 @@
sh make.sh
```
成功编译后,`exr_op/src` 目录下将会生成 `pointnet2_lib.so`
成功编译后,`ext_op/src` 目录下将会生成 `pointnet2_lib.so`
执行下列操作,确保自定义算子编译正确:
......@@ -69,12 +69,12 @@
export PYTHONPATH=$PYTHONPATH:`pwd`
# 运行单测
python test/test_farthest_point_sampling_op.py
python test/test_gather_point_op.py
python test/test_group_points_op.py
python test/test_query_ball_op.py
python test/test_three_interp_op.py
python test/test_three_nn_op.py
python tests/test_farthest_point_sampling_op.py
python tests/test_gather_point_op.py
python tests/test_group_points_op.py
python tests/test_query_ball_op.py
python tests/test_three_interp_op.py
python tests/test_three_nn_op.py
```
单测运行成功会输出提示信息,如下所示:
......
......@@ -25,7 +25,7 @@ import paddle.fluid as fluid
from models import *
from data.data_utils import *
from data.modelnet40_reader import ModelNet40ClsReader
from utils import check_gpu, parse_outputs, Stat
from utils import *
logging.root.handlers = []
FORMAT = '%(asctime)s-%(levelname)s: %(message)s'
......@@ -83,6 +83,7 @@ def parse_args():
def eval():
args = parse_args()
print_arguments(args)
# check whether the installed paddle is compiled with GPU
check_gpu(args.use_gpu)
......
......@@ -24,7 +24,7 @@ import paddle.fluid as fluid
from models import *
from data.indoor3d_reader import Indoor3DReader
from utils import check_gpu, parse_outputs, Stat
from utils import *
logging.root.handlers = []
FORMAT = '%(asctime)s-%(levelname)s: %(message)s'
......@@ -82,6 +82,7 @@ def parse_args():
def eval():
args = parse_args()
print_arguments(args)
# check whether the installed paddle is compiled with GPU
check_gpu(args.use_gpu)
......
......@@ -20,7 +20,8 @@
**说明:** 推荐使用docker编译
- 安装Paddle develop[每日版本whl包](https://www.paddlepaddle.org.cn/install/doc/tables#多版本whl包列表-dev-11)
**说明:** Paddle develop每日版本目前采用**gcc 4.8.2**版本编译,若使用每日版本,请使用**gcc 4.8.2**版本编译自定义OP,否则可能出现兼容性问题。
**注意:** 编译自定义OP使用的gcc版本须与Paddle编译使用gcc版本一致,Paddle develop每日版本目前采用**gcc 4.8.2**版本编译,若使用每日版本,请使用**gcc 4.8.2**版本编译自定义OP,否则可能出现兼容性问题。
## 编译自定义OP
......
......@@ -25,7 +25,7 @@ import paddle.fluid as fluid
from models import *
from data.modelnet40_reader import ModelNet40ClsReader
from data.data_utils import *
from utils import check_gpu, parse_outputs, Stat
from utils import *
logging.root.handlers = []
FORMAT = '%(asctime)s-%(levelname)s: %(message)s'
......@@ -117,6 +117,7 @@ def parse_args():
def train():
args = parse_args()
print_arguments(args)
# check whether the installed paddle is compiled with GPU
check_gpu(args.use_gpu)
......
......@@ -24,7 +24,7 @@ import paddle.fluid as fluid
from models import *
from data.indoor3d_reader import Indoor3DReader
from utils import check_gpu, parse_outputs, Stat
from utils import *
logging.root.handlers = []
FORMAT = '%(asctime)s-%(levelname)s: %(message)s'
......@@ -116,6 +116,7 @@ def parse_args():
def train():
args = parse_args()
print_arguments(args)
# check whether the installed paddle is compiled with GPU
check_gpu(args.use_gpu)
......
......@@ -20,11 +20,12 @@ from __future__ import division
from __future__ import print_function
import sys
import six
import logging
import numpy as np
import paddle.fluid as fluid
__all__ = ["chech_gpu"]
__all__ = ["check_gpu", "print_arguments", "parse_outputs", "Stat"]
logger = logging.getLogger(__name__)
......@@ -47,6 +48,27 @@ def check_gpu(use_gpu):
pass
def print_arguments(args):
"""Print argparse's arguments.
Usage:
.. code-block:: python
parser = argparse.ArgumentParser()
parser.add_argument("name", default="Jonh", type=str, help="User name.")
args = parser.parse_args()
print_arguments(args)
:param args: Input argparse.Namespace for printing.
:type args: argparse.Namespace
"""
logger.info("----------- Configuration Arguments -----------")
for arg, value in sorted(six.iteritems(vars(args))):
logger.info("%s: %s" % (arg, value))
logger.info("------------------------------------------------")
def parse_outputs(outputs):
keys, values = [], []
for k, v in outputs.items():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册