Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
9115ab1c
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看板
提交
9115ab1c
编写于
11月 14, 2016
作者:
Y
Yu Yang
提交者:
GitHub
11月 14, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #450 from reyoung/feature/pre-commit-hooks-scripts
Feature/pre commit hooks scripts
上级
2b841ec8
07af31fd
变更
36
展开全部
显示空白变更内容
内联
并排
Showing
36 changed file
with
4957 addition
and
4872 deletion
+4957
-4872
.clang-format
.clang-format
+2
-3
.pre-commit-config.yaml
.pre-commit-config.yaml
+24
-0
demo/introduction/README.md
demo/introduction/README.md
+0
-1
demo/mnist/data/get_mnist_data.sh
demo/mnist/data/get_mnist_data.sh
+0
-1
demo/recommendation/data/config.json
demo/recommendation/data/config.json
+0
-1
demo/semantic_role_labeling/test.sh
demo/semantic_role_labeling/test.sh
+0
-1
demo/semantic_role_labeling/train.sh
demo/semantic_role_labeling/train.sh
+0
-1
doc/demo/semantic_role_labeling/semantic_role_labeling.md
doc/demo/semantic_role_labeling/semantic_role_labeling.md
+183
-183
doc/introduction/index.md
doc/introduction/index.md
+0
-1
doc_cn/algorithm/rnn/hierarchical-layer.md
doc_cn/algorithm/rnn/hierarchical-layer.md
+66
-66
doc_cn/algorithm/rnn/hierarchical-rnn.md
doc_cn/algorithm/rnn/hierarchical-rnn.md
+403
-403
doc_cn/algorithm/rnn/rnn-tutorial.md
doc_cn/algorithm/rnn/rnn-tutorial.md
+1
-1
doc_cn/build_and_install/install/paddle_version.txt
doc_cn/build_and_install/install/paddle_version.txt
+1
-1
doc_cn/faq/reduce_min_pool_size.py
doc_cn/faq/reduce_min_pool_size.py
+1
-1
paddle/.common_test_util.sh
paddle/.common_test_util.sh
+1
-1
paddle/CMakeLists.txt
paddle/CMakeLists.txt
+0
-2
paddle/api/PaddleAPIPrivate.h
paddle/api/PaddleAPIPrivate.h
+0
-1
paddle/api/test/CMakeLists.txt
paddle/api/test/CMakeLists.txt
+1
-1
paddle/api/test/testMatrix.py
paddle/api/test/testMatrix.py
+2
-2
paddle/cuda/include/hl_base.h
paddle/cuda/include/hl_base.h
+0
-1
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
+0
-1
paddle/cuda/src/avx_mathfun.h
paddle/cuda/src/avx_mathfun.h
+0
-1
paddle/gserver/layers/FullyConnectedLayer.h
paddle/gserver/layers/FullyConnectedLayer.h
+0
-1
paddle/math/MathFunctions.h
paddle/math/MathFunctions.h
+0
-1
paddle/parameter/CMakeLists.txt
paddle/parameter/CMakeLists.txt
+1
-1
paddle/parameter/tests/CMakeLists.txt
paddle/parameter/tests/CMakeLists.txt
+1
-1
paddle/scripts/CMakeLists.txt
paddle/scripts/CMakeLists.txt
+1
-1
paddle/scripts/cpplint.py
paddle/scripts/cpplint.py
+4254
-4171
paddle/scripts/deb/build_scripts/build.sh
paddle/scripts/deb/build_scripts/build.sh
+0
-2
paddle/scripts/docker/generate.sh
paddle/scripts/docker/generate.sh
+0
-1
paddle/scripts/travis/common.sh
paddle/scripts/travis/common.sh
+0
-1
paddle/trainer/tests/test.txt
paddle/trainer/tests/test.txt
+0
-1
paddle/trainer/tests/test_gen_dict.txt
paddle/trainer/tests/test_gen_dict.txt
+1
-1
paddle/trainer/tests/train.txt
paddle/trainer/tests/train.txt
+0
-1
paddle/utils/tests/test_CommandLineParser.cpp
paddle/utils/tests/test_CommandLineParser.cpp
+0
-1
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+14
-14
未找到文件。
.clang-format
浏览文件 @
9115ab1c
...
...
@@ -13,8 +13,6 @@
# The document of clang-format is
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# TODO(yuyang18): Add python and other language code style
---
Language: Cpp
BasedOnStyle: Google
...
...
@@ -22,8 +20,9 @@ IndentWidth: 2
TabWidth: 2
ContinuationIndentWidth: 4
AccessModifierOffset: -2 # The private/protected/public has no indent in class
PointerAlignment: Left # int* p/int& p, not int *p/int &p
Standard: Cpp11
AllowAllParametersOfDeclarationOnNextLine: true
BinPackParameters: false
BinPackArguments: false
...
.pre-commit-config.yaml
0 → 100644
浏览文件 @
9115ab1c
-
repo
:
https://github.com/Lucas-C/pre-commit-hooks.git
sha
:
c25201a00e6b0514370501050cf2a8538ac12270
hooks
:
-
id
:
remove-crlf
-
repo
:
https://github.com/reyoung/mirrors-yapf.git
sha
:
v0.13.2
hooks
:
-
id
:
yapf
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
sha
:
4ef03c4223ad322c7adaa6c6c0efb26b57df3b71
hooks
:
-
id
:
check-added-large-files
-
id
:
check-merge-conflict
-
id
:
check-symlinks
-
id
:
detect-private-key
-
id
:
end-of-file-fixer
# TODO(yuyang): trailing whitespace has some bugs on markdown
# files now, please not add it to pre-commit hook now
# - id: trailing-whitespace
#
# TODO(yuyang): debug-statements not fit for Paddle, because
# not all of our python code is runnable. Some are used for
# documenation
# - id: debug-statements
demo/introduction/README.md
浏览文件 @
9115ab1c
This folder contains scripts used in PaddlePaddle introduction.
-
use
`bash train.sh`
to train a simple linear regression model
-
use
`python evaluate_model.py`
to read model parameters. You can see that
`w`
and
`b`
are very close to [2, 0.3].
demo/mnist/data/get_mnist_data.sh
浏览文件 @
9115ab1c
...
...
@@ -19,4 +19,3 @@ done
cd
$DIR
rm
-f
*
.list
python generate_list.py
demo/recommendation/data/config.json
浏览文件 @
9115ab1c
...
...
@@ -14,4 +14,3 @@
"fields"
:
[
"id"
,
"title"
,
"genres"
]
}
}
demo/semantic_role_labeling/test.sh
浏览文件 @
9115ab1c
...
...
@@ -37,4 +37,3 @@ paddle train \
--use_gpu
=
false
\
--config_args
=
is_test
=
1
\
2>&1 |
tee
'test.log'
demo/semantic_role_labeling/train.sh
浏览文件 @
9115ab1c
...
...
@@ -24,4 +24,3 @@ paddle train \
--show_parameter_stats_period
=
10
\
--test_all_data_in_one_period
=
1
\
2>&1 |
tee
'train.log'
doc/demo/semantic_role_labeling/semantic_role_labeling.md
浏览文件 @
9115ab1c
doc/introduction/index.md
浏览文件 @
9115ab1c
...
...
@@ -98,4 +98,3 @@ There, you have recovered the underlying pattern between `X` and `Y` only from o
-
<a
href=
"../build/index.html"
>
Build and Installation
</a>
-
<a
href=
"../demo/quick_start/index_en.html"
>
Quick Start
</a>
-
<a
href=
"../demo/index.html"
>
Example and Demo
</a>
doc_cn/algorithm/rnn/hierarchical-layer.md
浏览文件 @
9115ab1c
doc_cn/algorithm/rnn/hierarchical-rnn.md
浏览文件 @
9115ab1c
doc_cn/algorithm/rnn/rnn-tutorial.md
浏览文件 @
9115ab1c
doc_cn/build_and_install/install/paddle_version.txt
浏览文件 @
9115ab1c
doc_cn/faq/reduce_min_pool_size.py
浏览文件 @
9115ab1c
paddle/.common_test_util.sh
浏览文件 @
9115ab1c
paddle/CMakeLists.txt
浏览文件 @
9115ab1c
...
...
@@ -17,5 +17,3 @@ endif()
if
(
WITH_SWIG_PY
)
add_subdirectory
(
api
)
endif
()
paddle/api/PaddleAPIPrivate.h
浏览文件 @
9115ab1c
...
...
@@ -65,4 +65,3 @@ struct ArgumentsPrivate {
return
*
(
std
::
shared_ptr
<
T
>*
)(
rawPtr
);
}
};
paddle/api/test/CMakeLists.txt
浏览文件 @
9115ab1c
paddle/api/test/testMatrix.py
浏览文件 @
9115ab1c
...
...
@@ -69,8 +69,8 @@ class TestMatrix(unittest.TestCase):
def
test_numpy
(
self
):
numpy_mat
=
np
.
matrix
([[
1
,
2
],
[
3
,
4
],
[
5
,
6
]],
dtype
=
"float32"
)
m
=
swig_paddle
.
Matrix
.
createCpuDenseFromNumpy
(
numpy_mat
)
self
.
assertEqual
(
(
int
(
m
.
getHeight
()),
int
(
m
.
getWidth
())),
numpy_mat
.
shape
)
self
.
assertEqual
(
(
int
(
m
.
getHeight
()),
int
(
m
.
getWidth
())),
numpy_mat
.
shape
)
# the numpy matrix and paddle matrix shared the same memory.
numpy_mat
[
0
,
1
]
=
342.23
...
...
paddle/cuda/include/hl_base.h
浏览文件 @
9115ab1c
...
...
@@ -254,4 +254,3 @@ extern __thread cudaStream_t default_stream;
#endif
/* __NVCC__ */
#endif
/* HL_BASE_H_ */
paddle/cuda/include/stub/hl_cuda_cudnn_stub.h
浏览文件 @
9115ab1c
...
...
@@ -199,4 +199,3 @@ inline void hl_batch_norm_backward(hl_tensor_descriptor inputDesc,
real
*
savedInvVar
)
{}
#endif // HL_CUDA_CUDNN_STUB_H_
paddle/cuda/src/avx_mathfun.h
浏览文件 @
9115ab1c
...
...
@@ -718,4 +718,3 @@ void sincos256_ps(v8sf x, v8sf *s, v8sf *c) {
*
s
=
_mm256_xor_ps
(
xmm1
,
sign_bit_sin
);
*
c
=
_mm256_xor_ps
(
xmm2
,
sign_bit_cos
);
}
paddle/gserver/layers/FullyConnectedLayer.h
浏览文件 @
9115ab1c
...
...
@@ -48,4 +48,3 @@ public:
};
}
// namespace paddle
paddle/math/MathFunctions.h
浏览文件 @
9115ab1c
...
...
@@ -80,4 +80,3 @@ void vTanh(const int n, const T* a, T* r);
}
// namespace paddle
#endif // MATHFUNCTIONS_H_
paddle/parameter/CMakeLists.txt
浏览文件 @
9115ab1c
paddle/parameter/tests/CMakeLists.txt
浏览文件 @
9115ab1c
paddle/scripts/CMakeLists.txt
浏览文件 @
9115ab1c
paddle/scripts/cpplint.py
浏览文件 @
9115ab1c
此差异已折叠。
点击以展开。
paddle/scripts/deb/build_scripts/build.sh
浏览文件 @
9115ab1c
...
...
@@ -33,5 +33,3 @@ cmake .. -DWITH_GPU=ON -DWITH_SWIG_PY=ON -DWITH_AVX=OFF -DCUDNN_ROOT=/usr/
make
-j
`
nproc
`
cpack
-D
CPACK_GENERATOR
=
'DEB'
..
mv
*
.deb ~/dist/gpu-noavx
paddle/scripts/docker/generate.sh
浏览文件 @
9115ab1c
...
...
@@ -58,4 +58,3 @@ m4 -DPADDLE_WITH_GPU=ON -DPADDLE_IS_DEVEL=ON -DPADDLE_WITH_DEMO=ON \
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.gpu-noavx-demo
paddle/scripts/travis/common.sh
浏览文件 @
9115ab1c
...
...
@@ -2,4 +2,3 @@
set
-e
mkdir
-p
../../../build
cd
../../../build
paddle/trainer/tests/test.txt
浏览文件 @
9115ab1c
...
...
@@ -998,4 +998,3 @@ from IN B-PP
Friday NNP B-NP
's POS B-NP
Tokyo NNP I-NP
paddle/trainer/tests/test_gen_dict.txt
浏览文件 @
9115ab1c
paddle/trainer/tests/train.txt
浏览文件 @
9115ab1c
...
...
@@ -4998,4 +4998,3 @@ However RB B-ADVP
the DT B-NP
disclosure NN I-NP
of IN B-PP
paddle/utils/tests/test_CommandLineParser.cpp
浏览文件 @
9115ab1c
...
...
@@ -109,4 +109,3 @@ int main(int argc, char** argv) {
}
#endif
python/paddle/trainer/config_parser.py
浏览文件 @
9115ab1c
...
...
@@ -410,8 +410,8 @@ def RecurrentLayerGroupEnd(name):
"RecurrentLayerGroup not begin"
)
for
pair
in
g_current_submodel
.
memories
:
#check exist
layer
=
g_layer_map
[
pair
.
layer_name
]
config_assert
(
layer
is
not
None
,
"memory declare wrong name:%s"
%
pair
.
layer_name
)
config_assert
(
layer
is
not
None
,
"memory declare wrong name:%s"
%
pair
.
layer_name
)
memory_link
=
g_layer_map
[
pair
.
link_name
]
config_assert
(
layer
.
size
==
memory_link
.
size
,
"memory declare wrong size:%d"
%
memory_link
.
size
)
...
...
@@ -686,8 +686,8 @@ class ConvProjection(Projection):
parse_conv
(
conv_conf
,
input_layer_name
,
self
.
proj_conf
.
conv_conf
,
num_filters
)
# TODO: support rectangle input
self
.
proj_conf
.
output_size
=
(
self
.
proj_conf
.
conv_conf
.
output_x
**
2
)
*
num_filters
self
.
proj_conf
.
output_size
=
(
self
.
proj_conf
.
conv_conf
.
output_x
**
2
)
*
num_filters
def
calc_output_size
(
self
,
input_layer_config
):
return
self
.
proj_conf
.
output_size
...
...
@@ -2793,8 +2793,8 @@ class ConcatenateLayer2(LayerBase):
@
config_layer
(
'recurrent'
)
class
RecurrentLayer
(
LayerBase
):
def
__init__
(
self
,
name
,
inputs
,
reversed
=
False
,
bias
=
True
,
**
xargs
):
super
(
RecurrentLayer
,
self
).
__init__
(
name
,
'recurrent'
,
0
,
inputs
,
**
xargs
)
super
(
RecurrentLayer
,
self
).
__init__
(
name
,
'recurrent'
,
0
,
inputs
,
**
xargs
)
config_assert
(
len
(
self
.
inputs
)
==
1
,
'RecurrentLayer must have 1 input'
)
input_layer
=
self
.
get_input_layer
(
0
)
size
=
input_layer
.
size
...
...
@@ -2876,22 +2876,22 @@ class MDLstmLayer(LayerBase):
active_state_type
=
"sigmoid"
,
bias
=
True
,
**
xargs
):
super
(
MDLstmLayer
,
self
).
__init__
(
name
,
'mdlstmemory'
,
0
,
inputs
,
**
xargs
)
super
(
MDLstmLayer
,
self
).
__init__
(
name
,
'mdlstmemory'
,
0
,
inputs
,
**
xargs
)
config_assert
(
len
(
self
.
inputs
)
==
1
,
'MDLstmLayer must have 1 input'
)
input_layer
=
self
.
get_input_layer
(
0
)
dim_num
=
len
(
directions
)
#check input_layer.size is divided by (3+dim_num)
config_assert
(
input_layer
.
size
%
(
3
+
dim_num
)
==
0
,
"size % (dim_num) should be 0!"
)
config_assert
(
input_layer
.
size
%
(
3
+
dim_num
)
==
0
,
"size % (dim_num) should be 0!"
)
size
=
input_layer
.
size
/
(
3
+
dim_num
)
self
.
set_layer_size
(
size
)
self
.
config
.
active_gate_type
=
active_gate_type
self
.
config
.
active_state_type
=
active_state_type
for
i
in
xrange
(
len
(
directions
)):
self
.
config
.
directions
.
append
(
int
(
directions
[
i
]))
self
.
create_input_parameter
(
0
,
size
*
size
*
(
3
+
dim_num
),
[
size
,
size
,
3
+
dim_num
])
self
.
create_input_parameter
(
0
,
size
*
size
*
(
3
+
dim_num
),
[
size
,
size
,
3
+
dim_num
])
#bias includes 3 kinds of peephole, 3+dim_num+2+dim_num
self
.
create_bias_parameter
(
bias
,
size
*
(
5
+
2
*
dim_num
))
...
...
@@ -2929,8 +2929,8 @@ class GruStepLayer(LayerBase):
active_gate_type
=
"sigmoid"
,
bias
=
True
,
**
xargs
):
super
(
GruStepLayer
,
self
).
__init__
(
name
,
'gru_step'
,
size
,
inputs
,
**
xargs
)
super
(
GruStepLayer
,
self
).
__init__
(
name
,
'gru_step'
,
size
,
inputs
,
**
xargs
)
config_assert
(
len
(
self
.
inputs
)
==
2
,
'GruStepLayer must have 2 input'
)
input_layer0
=
self
.
get_input_layer
(
0
)
input_layer1
=
self
.
get_input_layer
(
1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录