Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
836d6138
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
836d6138
编写于
11月 13, 2016
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update pre-commit-config
* Check all files by pre commit hooks
上级
f2392ada
变更
35
展开全部
显示空白变更内容
内联
并排
Showing
35 changed file
with
4947 addition
and
4870 deletion
+4947
-4870
.pre-commit-config.yaml
.pre-commit-config.yaml
+16
-1
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
未找到文件。
.pre-commit-config.yaml
浏览文件 @
836d6138
...
...
@@ -6,4 +6,19 @@
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
浏览文件 @
836d6138
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
浏览文件 @
836d6138
...
...
@@ -19,4 +19,3 @@ done
cd
$DIR
rm
-f
*
.list
python generate_list.py
demo/recommendation/data/config.json
浏览文件 @
836d6138
...
...
@@ -14,4 +14,3 @@
"fields"
:
[
"id"
,
"title"
,
"genres"
]
}
}
demo/semantic_role_labeling/test.sh
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
doc/introduction/index.md
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
doc_cn/algorithm/rnn/hierarchical-rnn.md
浏览文件 @
836d6138
doc_cn/algorithm/rnn/rnn-tutorial.md
浏览文件 @
836d6138
doc_cn/build_and_install/install/paddle_version.txt
浏览文件 @
836d6138
doc_cn/faq/reduce_min_pool_size.py
浏览文件 @
836d6138
paddle/.common_test_util.sh
浏览文件 @
836d6138
paddle/CMakeLists.txt
浏览文件 @
836d6138
...
...
@@ -17,5 +17,3 @@ endif()
if
(
WITH_SWIG_PY
)
add_subdirectory
(
api
)
endif
()
paddle/api/PaddleAPIPrivate.h
浏览文件 @
836d6138
...
...
@@ -65,4 +65,3 @@ struct ArgumentsPrivate {
return
*
(
std
::
shared_ptr
<
T
>*
)(
rawPtr
);
}
};
paddle/api/test/CMakeLists.txt
浏览文件 @
836d6138
paddle/api/test/testMatrix.py
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -48,4 +48,3 @@ public:
};
}
// namespace paddle
paddle/math/MathFunctions.h
浏览文件 @
836d6138
...
...
@@ -80,4 +80,3 @@ void vTanh(const int n, const T* a, T* r);
}
// namespace paddle
#endif // MATHFUNCTIONS_H_
paddle/parameter/CMakeLists.txt
浏览文件 @
836d6138
paddle/parameter/tests/CMakeLists.txt
浏览文件 @
836d6138
paddle/scripts/CMakeLists.txt
浏览文件 @
836d6138
paddle/scripts/cpplint.py
浏览文件 @
836d6138
此差异已折叠。
点击以展开。
paddle/scripts/deb/build_scripts/build.sh
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -2,4 +2,3 @@
set
-e
mkdir
-p
../../../build
cd
../../../build
paddle/trainer/tests/test.txt
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
paddle/trainer/tests/train.txt
浏览文件 @
836d6138
...
...
@@ -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
浏览文件 @
836d6138
...
...
@@ -109,4 +109,3 @@ int main(int argc, char** argv) {
}
#endif
python/paddle/trainer/config_parser.py
浏览文件 @
836d6138
...
...
@@ -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
)
...
...
@@ -672,8 +672,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
...
...
@@ -2779,8 +2779,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
...
...
@@ -2862,22 +2862,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
))
...
...
@@ -2915,8 +2915,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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录