Skip to content

Commit 7bb7fed

Browse files
committed
Simplify the CMakelist.txt and fix typos.
1 parent 46ef2bc commit 7bb7fed

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

CMakeLists.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,10 @@ find_package(Git REQUIRED)
7777
include(version)
7878
add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\")
7979

80-
8180
if(NOT WITH_GPU)
8281
add_definitions(-DPADDLE_ONLY_CPU)
8382
add_definitions(-DHPPL_STUB_FUNC)
8483

85-
if(WITH_DSO)
86-
add_definitions(-DPADDLE_USE_DSO)
87-
endif(WITH_DSO)
88-
8984
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
9085
else()
9186
if(${CUDA_VERSION_MAJOR} GREATER 6)
@@ -107,15 +102,15 @@ else()
107102
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}")
108103
endif(WITH_AVX)
109104

110-
if(WITH_DSO)
111-
add_definitions(-DPADDLE_USE_DSO)
112-
endif(WITH_DSO)
113-
114105
# Include cuda and cudnn
115106
include_directories(${CUDNN_INCLUDE_DIR})
116107
include_directories(${CUDA_TOOLKIT_INCLUDE})
117108
endif(NOT WITH_GPU)
118109

110+
if(WITH_DSO)
111+
add_definitions(-DPADDLE_USE_DSO)
112+
endif(WITH_DSO)
113+
119114
if(WITH_DOUBLE)
120115
add_definitions(-DPADDLE_TYPE_DOUBLE)
121116
set(ACCURACY double)

paddle/scripts/travis/build_and_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
./submodules.sh
2+
./build_submodules.sh
33
source ./common.sh
44
CMAKE_EXTRA=""
55
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set -e
3+
WORK_DIR=$PWD
34
PROJ_ROOT=$(git rev-parse --show-cdup)
45
SUBMODULES=$(grep path ${PROJ_ROOT}.gitmodules | sed 's/^.*path = //')
56

@@ -16,3 +17,4 @@ do
1617
;;
1718
esac
1819
done
20+
cd $WORK_DIR

python/paddle/trainer_config_helpers/layers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,7 +1874,7 @@ def img_conv_layer(input,
18741874
param_attr.attr["initial_std"] = init_w
18751875
param_attr.attr["initial_strategy"] = 0
18761876
param_attr.attr["initial_smart"] = False
1877-
1877+
18781878
if layer_type:
18791879
if trans:
18801880
assert layer_type in ["exconvt"]
@@ -4125,11 +4125,11 @@ def warp_ctc_layer(input,
41254125
41264126
Note:
41274127
- Let num_classes represent the category number. Considering the 'blank'
4128-
label needed by CTC, you need to use (num_classes + 1) as the input size.
4129-
Thus, the size of both warp_ctc_layer and 'input' layer should be set to
4130-
num_classes + 1.
4131-
- You can set 'blank' to [0, num_classes - 1], which should be consistent
4132-
as that used in your labels.
4128+
label needed by CTC, you need to use (num_classes + 1) as the input
4129+
size. Thus, the size of both warp_ctc_layer and 'input' layer should
4130+
be set to num_classes + 1.
4131+
- You can set 'blank' to any value ranged in [0, num_classes], which
4132+
should be consistent as that used in your labels.
41334133
- As a native 'softmax' activation is interated to the warp-ctc library,
41344134
'linear' activation is expected instead in the 'input' layer.
41354135

0 commit comments

Comments
 (0)