Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
159b7722
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看板
提交
159b7722
编写于
2月 10, 2018
作者:
T
Tao Luo
提交者:
Yi Wang
2月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete "Operators" in API tree (#8324)
上级
06f10942
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
156 deletion
+0
-156
paddle/pybind/CMakeLists.txt
paddle/pybind/CMakeLists.txt
+0
-4
paddle/pybind/print_operators_doc.cc
paddle/pybind/print_operators_doc.cc
+0
-148
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+0
-2
paddle/scripts/travis/build_doc.sh
paddle/scripts/travis/build_doc.sh
+0
-2
未找到文件。
paddle/pybind/CMakeLists.txt
浏览文件 @
159b7722
...
...
@@ -7,7 +7,3 @@ if(WITH_PYTHON)
target_link_libraries
(
paddle_pybind rt
)
endif
(
NOT APPLE AND NOT ANDROID
)
endif
(
WITH_PYTHON
)
if
(
WITH_DOC
)
cc_binary
(
print_operators_doc SRCS print_operators_doc.cc DEPS
${
GLOB_OP_LIB
}
)
endif
(
WITH_DOC
)
paddle/pybind/print_operators_doc.cc
已删除
100644 → 0
浏览文件 @
06f10942
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
//
// 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 <sstream> // std::stringstream
#include <string>
#include "paddle/framework/op_info.h"
#include "paddle/framework/op_registry.h"
#include "paddle/pybind/pybind.h"
std
::
string
Escape
(
const
std
::
string
&
s
)
{
std
::
string
r
;
for
(
size_t
i
=
0
;
i
<
s
.
size
();
i
++
)
{
switch
(
s
[
i
])
{
case
'\"'
:
r
+=
"
\\\"
"
;
break
;
case
'\\'
:
r
+=
"
\\\\
"
;
break
;
case
'\n'
:
r
+=
"
\\
n"
;
break
;
case
'\t'
:
r
+=
"
\\
t"
;
case
'\r'
:
break
;
default:
r
+=
s
[
i
];
break
;
}
}
return
r
;
}
std
::
string
AttrType
(
paddle
::
framework
::
proto
::
AttrType
at
)
{
switch
(
at
)
{
case
paddle
::
framework
::
proto
::
INT
:
return
"int"
;
case
paddle
::
framework
::
proto
::
FLOAT
:
return
"float"
;
case
paddle
::
framework
::
proto
::
STRING
:
return
"string"
;
case
paddle
::
framework
::
proto
::
BOOLEAN
:
return
"bool"
;
case
paddle
::
framework
::
proto
::
INTS
:
return
"int array"
;
case
paddle
::
framework
::
proto
::
FLOATS
:
return
"float array"
;
case
paddle
::
framework
::
proto
::
STRINGS
:
return
"string array"
;
case
paddle
::
framework
::
proto
::
BOOLEANS
:
return
"bool array"
;
case
paddle
::
framework
::
proto
::
BLOCK
:
return
"block id"
;
case
paddle
::
framework
::
proto
::
LONG
:
return
"long"
;
}
return
"UNKNOWN"
;
// not possible
}
void
PrintVar
(
const
paddle
::
framework
::
proto
::
OpProto
::
Var
&
v
,
std
::
stringstream
&
ss
)
{
ss
<<
" { "
<<
"
\n
"
<<
"
\"
name
\"
:
\"
"
<<
Escape
(
v
.
name
())
<<
"
\"
,
\n
"
<<
"
\"
comment
\"
:
\"
"
<<
Escape
(
v
.
comment
())
<<
"
\"
,
\n
"
<<
"
\"
duplicable
\"
: "
<<
v
.
duplicable
()
<<
",
\n
"
<<
"
\"
intermediate
\"
: "
<<
v
.
intermediate
()
<<
"
\n
"
<<
" },"
;
}
void
PrintAttr
(
const
paddle
::
framework
::
proto
::
OpProto
::
Attr
&
a
,
std
::
stringstream
&
ss
)
{
ss
<<
" { "
<<
"
\n
"
<<
"
\"
name
\"
:
\"
"
<<
Escape
(
a
.
name
())
<<
"
\"
,
\n
"
<<
"
\"
type
\"
:
\"
"
<<
AttrType
(
a
.
type
())
<<
"
\"
,
\n
"
<<
"
\"
comment
\"
:
\"
"
<<
Escape
(
a
.
comment
())
<<
"
\"
,
\n
"
<<
"
\"
generated
\"
: "
<<
a
.
generated
()
<<
"
\n
"
<<
" },"
;
}
void
PrintOpProto
(
const
std
::
string
&
type
,
const
paddle
::
framework
::
OpInfo
&
opinfo
,
std
::
stringstream
&
ss
)
{
std
::
cerr
<<
"Processing "
<<
type
<<
"
\n
"
;
const
paddle
::
framework
::
proto
::
OpProto
*
p
=
opinfo
.
proto_
;
if
(
p
==
nullptr
)
{
return
;
// It is possible that an operator doesn't have OpProto.
}
ss
<<
"{
\n
"
<<
"
\"
type
\"
:
\"
"
<<
Escape
(
p
->
type
())
<<
"
\"
,
\n
"
<<
"
\"
comment
\"
:
\"
"
<<
Escape
(
p
->
comment
())
<<
"
\"
,
\n
"
;
ss
<<
"
\"
inputs
\"
: [ "
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
p
->
inputs_size
();
i
++
)
{
PrintVar
(
p
->
inputs
(
i
),
ss
);
}
ss
.
seekp
(
-
1
,
ss
.
cur
);
// remove the trailing comma
ss
<<
" ], "
<<
"
\n
"
;
ss
<<
"
\"
outputs
\"
: [ "
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
p
->
outputs_size
();
i
++
)
{
PrintVar
(
p
->
outputs
(
i
),
ss
);
}
ss
.
seekp
(
-
1
,
ss
.
cur
);
// remove the trailing comma
ss
<<
" ], "
<<
"
\n
"
;
ss
<<
"
\"
attrs
\"
: [ "
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
p
->
attrs_size
();
i
++
)
{
PrintAttr
(
p
->
attrs
(
i
),
ss
);
}
ss
.
seekp
(
-
1
,
ss
.
cur
);
// remove the trailing comma
ss
<<
" ] "
<<
"
\n
"
;
ss
<<
"},"
;
}
int
main
()
{
std
::
stringstream
ss
;
ss
<<
"[
\n
"
;
for
(
auto
&
iter
:
paddle
::
framework
::
OpInfoMap
::
Instance
().
map
())
{
PrintOpProto
(
iter
.
first
,
iter
.
second
,
ss
);
}
ss
.
seekp
(
-
1
,
ss
.
cur
);
// remove the trailing comma
ss
<<
"]
\n
"
;
std
::
cout
<<
ss
.
str
();
}
paddle/scripts/docker/build.sh
浏览文件 @
159b7722
...
...
@@ -118,8 +118,6 @@ EOF
make
-j
`
nproc
`
gen_proto_py
make
-j
`
nproc
`
paddle_python
make
-j
`
nproc
`
paddle_docs paddle_docs_cn paddle_api_docs
make
-j
`
nproc
`
print_operators_doc
paddle/pybind/print_operators_doc
>
doc/en/html/operators.json
popd
fi
...
...
paddle/scripts/travis/build_doc.sh
浏览文件 @
159b7722
...
...
@@ -10,8 +10,6 @@ cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_MKL=OFF -DWITH_DOC=ON
make
-j
`
nproc
`
gen_proto_py
make
-j
`
nproc
`
paddle_python
make
-j
`
nproc
`
paddle_docs paddle_docs_cn paddle_api_docs
make
-j
`
nproc
`
print_operators_doc
paddle/pybind/print_operators_doc
>
doc/en/html/operators.json
# check websites for broken links
linkchecker doc/en/html/index.html
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录