Skip to content

Commit fc117ec

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/evaluator
2 parents 7c79243 + 85b839f commit fc117ec

File tree

192 files changed

+8084
-1215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+8084
-1215
lines changed

benchmark/paddle/image/vgg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
settings(
1515
batch_size=batch_size,
16-
learning_rate=0.01 / batch_size,
16+
learning_rate=0.001 / batch_size,
1717
learning_method=MomentumOptimizer(0.9),
1818
regularization=L2Regularization(0.0005 * batch_size))
1919

cmake/cblas.cmake

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
# Find the CBlas and lapack libraries
22
#
3-
# It will search MKL, atlas, OpenBlas, reference-cblas in order.
3+
# It will search MKLML, atlas, OpenBlas, reference-cblas in order.
44
#
55
# If any cblas implementation found, the following variable will be set.
6-
# CBLAS_PROVIDER # one of MKL, ATLAS, OPENBLAS, REFERENCE
6+
# CBLAS_PROVIDER # one of MKLML, ATLAS, OPENBLAS, REFERENCE
77
# CBLAS_INC_DIR # the include directory for cblas.
88
# CBLAS_LIBS # a list of libraries should be linked by paddle.
99
# # Each library should be full path to object file.
10-
#
11-
# User should set one of MKL_ROOT, ATLAS_ROOT, OPENBLAS_ROOT, REFERENCE_CBLAS_ROOT
12-
# during cmake. If none of them set, it will try to find cblas implementation in
13-
# system paths.
14-
#
1510

1611
set(CBLAS_FOUND OFF)
1712

@@ -30,44 +25,6 @@ if(WITH_MKLML AND MKLML_INC_DIR AND MKLML_LIB)
3025
return()
3126
endif()
3227

33-
## Then find MKL.
34-
set(INTEL_MKL_ROOT "/opt/intel/mkl" CACHE PATH "Folder contains intel mkl libs")
35-
set(MKL_ROOT $ENV{MKL_ROOT} CACHE PATH "Folder contains env MKL")
36-
37-
set(MKL_INCLUDE_SEARCH_PATHS
38-
${MKL_ROOT}/include
39-
${INTEL_MKL_ROOT}/include)
40-
set(MKL_LIB_SEARCH_PATHS
41-
${MKL_ROOT}/lib
42-
${MKL_ROOT}/lib/intel64
43-
${INTEL_MKL_ROOT}/lib
44-
${INTEL_MKL_ROOT}/lib/intel64)
45-
46-
find_path(MKL_INC_DIR mkl.h PATHS
47-
${MKL_INCLUDE_SEARCH_PATHS})
48-
find_path(MKL_LAPACK_INC_DIR mkl_lapacke.h PATHS
49-
${MKL_INCLUDE_SEARCH_PATHS})
50-
find_library(MKL_CORE_LIB NAMES mkl_core PATHS
51-
${MKL_LIB_SEARCH_PATHS})
52-
find_library(MKL_SEQUENTIAL_LIB NAMES mkl_sequential PATHS
53-
${MKL_LIB_SEARCH_PATHS})
54-
find_library(MKL_INTEL_LP64 NAMES mkl_intel_lp64 PATHS
55-
${MKL_LIB_SEARCH_PATHS})
56-
57-
if(MKL_LAPACK_INC_DIR AND MKL_INC_DIR AND MKL_CORE_LIB AND MKL_SEQUENTIAL_LIB AND MKL_INTEL_LP64)
58-
set(CBLAS_FOUND ON)
59-
set(CBLAS_PROVIDER MKL)
60-
set(CBLAS_INC_DIR ${MKL_INC_DIR} ${MKL_LAPACK_INC_DIR})
61-
set(CBLAS_LIBRARIES ${MKL_INTEL_LP64} ${MKL_SEQUENTIAL_LIB} ${MKL_CORE_LIB})
62-
63-
add_definitions(-DPADDLE_USE_MKL)
64-
add_definitions(-DLAPACK_FOUND)
65-
66-
message(STATUS "Found MKL (include: ${MKL_INC_DIR}, library: ${CBLAS_LIBRARIES})")
67-
message(STATUS "Found lapack in MKL (include: ${MKL_LAPACK_INC_DIR})")
68-
return()
69-
endif()
70-
7128
## Then find atlas.
7229
set(ATLAS_ROOT $ENV{ATLAS_ROOT} CACHE PATH "Folder contains Atlas")
7330
set(ATLAS_INCLUDE_SEARCH_PATHS

cmake/external/mkldnn.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ IF(${CBLAS_PROVIDER} STREQUAL "MKLML")
4646
MESSAGE(STATUS "Build MKLDNN with ${MKLDNN_MKLROOT}")
4747
ENDIF()
4848

49+
SET(MKLDNN_CFLAG "${CMAKE_C_FLAGS} -Wno-error=strict-overflow")
50+
SET(MKLDNN_CXXFLAG "${CMAKE_CXX_FLAGS} -Wno-error=strict-overflow")
4951
ExternalProject_Add(
5052
${MKLDNN_PROJECT}
5153
${EXTERNAL_PROJECT_LOG_ARGS}
5254
DEPENDS ${MKLDNN_DEPENDS}
5355
GIT_REPOSITORY "https://github.com/01org/mkl-dnn.git"
54-
GIT_TAG "v0.10"
56+
GIT_TAG "v0.11"
5557
PREFIX ${MKLDNN_SOURCES_DIR}
5658
UPDATE_COMMAND ""
5759
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
5860
CMAKE_ARGS -DMKLROOT=${MKLDNN_MKLROOT}
61+
CMAKE_ARGS -DCMAKE_C_FLAGS=${MKLDNN_CFLAG}
62+
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${MKLDNN_CXXFLAG}
5963
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${MKLDNN_INSTALL_DIR}
6064
-DMKLROOT:PATH=${MKLDNN_MKLROOT}
6165
)

cmake/external/mklml.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ ENDIF()
2727
INCLUDE(ExternalProject)
2828

2929
SET(MKLML_PROJECT "extern_mklml")
30-
SET(MKLML_VER "mklml_lnx_2018.0.20170720")
31-
SET(MKLML_URL "https://github.com/01org/mkl-dnn/releases/download/v0.10/${MKLML_VER}.tgz")
30+
SET(MKLML_VER "mklml_lnx_2018.0.1.20171007")
31+
SET(MKLML_URL "https://github.com/01org/mkl-dnn/releases/download/v0.11/${MKLML_VER}.tgz")
3232
SET(MKLML_SOURCE_DIR "${THIRD_PARTY_PATH}/mklml")
3333
SET(MKLML_DOWNLOAD_DIR "${MKLML_SOURCE_DIR}/src/${MKLML_PROJECT}")
3434
SET(MKLML_DST_DIR "mklml")

cmake/external/openblas.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ IF(NOT ${CBLAS_FOUND})
8686
UPDATE_COMMAND ""
8787
CONFIGURE_COMMAND ""
8888
)
89-
89+
SET(CBLAS_PROVIDER openblas)
9090
IF(WITH_C_API)
9191
INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
9292
# Because libopenblas.a is a symbolic link of another library, thus need to
@@ -115,7 +115,7 @@ INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
115115
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)
116116
SET(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/cblas_dummy.c)
117117
FILE(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
118-
IF(${CBLAS_PROVIDER} MATCHES MKL)
118+
IF("${CBLAS_PROVIDER}" STREQUAL "MKLML")
119119
ADD_LIBRARY(cblas SHARED ${dummyfile})
120120
ELSE()
121121
ADD_LIBRARY(cblas STATIC ${dummyfile})

cmake/generic.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
9393
if(NOT APPLE AND NOT ANDROID)
9494
find_package(Threads REQUIRED)
9595
link_libraries(${CMAKE_THREAD_LIBS_INIT})
96-
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl -lrt")
96+
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -pthread -ldl -lrt")
9797
endif(NOT APPLE AND NOT ANDROID)
9898

9999
function(merge_static_libs TARGET_NAME)

doc/api/v2/config/layer.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ maxout
8282
.. autoclass:: paddle.v2.layer.maxout
8383
:noindex:
8484

85+
roi_pool
86+
--------
87+
.. autoclass:: paddle.v2.layer.roi_pool
88+
:noindex:
89+
8590
Norm Layer
8691
==========
8792

doc/api/v2/data.rst

Lines changed: 5 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,112 +2,9 @@
22
Data Reader Interface and DataSets
33
==================================
44

5+
.. toctree::
6+
:maxdepth: 1
57

6-
DataTypes
7-
=========
8-
9-
.. automodule:: paddle.v2.data_type
10-
:members:
11-
:noindex:
12-
13-
DataFeeder
14-
==========
15-
16-
.. automodule:: paddle.v2.data_feeder
17-
:members:
18-
:noindex:
19-
20-
Reader
21-
======
22-
23-
.. automodule:: paddle.v2.reader
24-
:members:
25-
:noindex:
26-
27-
.. automodule:: paddle.v2.reader.creator
28-
:members:
29-
:noindex:
30-
31-
minibatch
32-
=========
33-
34-
.. automodule:: paddle.v2.minibatch
35-
:members:
36-
:noindex:
37-
38-
Dataset
39-
=======
40-
41-
.. automodule:: paddle.v2.dataset
42-
:members:
43-
:noindex:
44-
45-
mnist
46-
+++++
47-
48-
.. automodule:: paddle.v2.dataset.mnist
49-
:members:
50-
:noindex:
51-
52-
cifar
53-
+++++
54-
55-
.. automodule:: paddle.v2.dataset.cifar
56-
:members:
57-
:noindex:
58-
59-
conll05
60-
+++++++
61-
62-
.. automodule:: paddle.v2.dataset.conll05
63-
:members: get_dict,get_embedding,test
64-
:noindex:
65-
66-
imdb
67-
++++
68-
69-
.. automodule:: paddle.v2.dataset.imdb
70-
:members:
71-
:noindex:
72-
73-
imikolov
74-
++++++++
75-
76-
.. automodule:: paddle.v2.dataset.imikolov
77-
:members:
78-
:noindex:
79-
80-
movielens
81-
+++++++++
82-
83-
.. automodule:: paddle.v2.dataset.movielens
84-
:members:
85-
:noindex:
86-
87-
.. autoclass:: paddle.v2.dataset.movielens.MovieInfo
88-
:noindex:
89-
90-
.. autoclass:: paddle.v2.dataset.movielens.UserInfo
91-
:noindex:
92-
93-
sentiment
94-
+++++++++
95-
96-
.. automodule:: paddle.v2.dataset.sentiment
97-
:members:
98-
:noindex:
99-
100-
uci_housing
101-
+++++++++++
102-
103-
.. automodule:: paddle.v2.dataset.uci_housing
104-
:members:
105-
:noindex:
106-
107-
wmt14
108-
+++++
109-
110-
.. automodule:: paddle.v2.dataset.wmt14
111-
:members:
112-
:noindex:
113-
8+
data/data_reader.rst
9+
data/image.rst
10+
data/dataset.rst

doc/api/v2/data/data_reader.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
=====================
2+
Data Reader Interface
3+
=====================
4+
5+
6+
DataTypes
7+
=========
8+
9+
.. automodule:: paddle.v2.data_type
10+
:members:
11+
:noindex:
12+
13+
DataFeeder
14+
==========
15+
16+
.. automodule:: paddle.v2.data_feeder
17+
:members:
18+
:noindex:
19+
20+
Reader
21+
======
22+
23+
.. automodule:: paddle.v2.reader
24+
:members:
25+
:noindex:
26+
27+
.. automodule:: paddle.v2.reader.creator
28+
:members:
29+
:noindex:
30+
31+
minibatch
32+
=========
33+
34+
.. automodule:: paddle.v2.minibatch
35+
:members:
36+
:noindex:

doc/api/v2/data/dataset.rst

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Dataset
2+
=======
3+
4+
.. automodule:: paddle.v2.dataset
5+
:members:
6+
:noindex:
7+
8+
mnist
9+
+++++
10+
11+
.. automodule:: paddle.v2.dataset.mnist
12+
:members:
13+
:noindex:
14+
15+
cifar
16+
+++++
17+
18+
.. automodule:: paddle.v2.dataset.cifar
19+
:members:
20+
:noindex:
21+
22+
conll05
23+
+++++++
24+
25+
.. automodule:: paddle.v2.dataset.conll05
26+
:members: get_dict,get_embedding,test
27+
:noindex:
28+
29+
imdb
30+
++++
31+
32+
.. automodule:: paddle.v2.dataset.imdb
33+
:members:
34+
:noindex:
35+
36+
imikolov
37+
++++++++
38+
39+
.. automodule:: paddle.v2.dataset.imikolov
40+
:members:
41+
:noindex:
42+
43+
movielens
44+
+++++++++
45+
46+
.. automodule:: paddle.v2.dataset.movielens
47+
:members:
48+
:noindex:
49+
50+
.. autoclass:: paddle.v2.dataset.movielens.MovieInfo
51+
:noindex:
52+
53+
.. autoclass:: paddle.v2.dataset.movielens.UserInfo
54+
:noindex:
55+
56+
sentiment
57+
+++++++++
58+
59+
.. automodule:: paddle.v2.dataset.sentiment
60+
:members:
61+
:noindex:
62+
63+
uci_housing
64+
+++++++++++
65+
66+
.. automodule:: paddle.v2.dataset.uci_housing
67+
:members:
68+
:noindex:
69+
70+
wmt14
71+
+++++
72+
73+
.. automodule:: paddle.v2.dataset.wmt14
74+
:members:
75+
:noindex:

0 commit comments

Comments
 (0)