提交 7bb7fed8 编写于 作者: L Liu Yiqun

Simplify the CMakelist.txt and fix typos.

上级 46ef2bc6
...@@ -77,15 +77,10 @@ find_package(Git REQUIRED) ...@@ -77,15 +77,10 @@ find_package(Git REQUIRED)
include(version) include(version)
add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\") add_definitions(-DPADDLE_VERSION=\"${PADDLE_VERSION}\")
if(NOT WITH_GPU) if(NOT WITH_GPU)
add_definitions(-DPADDLE_ONLY_CPU) add_definitions(-DPADDLE_ONLY_CPU)
add_definitions(-DHPPL_STUB_FUNC) add_definitions(-DHPPL_STUB_FUNC)
if(WITH_DSO)
add_definitions(-DPADDLE_USE_DSO)
endif(WITH_DSO)
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu) list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu)
else() else()
if(${CUDA_VERSION_MAJOR} GREATER 6) if(${CUDA_VERSION_MAJOR} GREATER 6)
...@@ -107,15 +102,15 @@ else() ...@@ -107,15 +102,15 @@ else()
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}") set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SSE3_FLAG}")
endif(WITH_AVX) endif(WITH_AVX)
if(WITH_DSO)
add_definitions(-DPADDLE_USE_DSO)
endif(WITH_DSO)
# Include cuda and cudnn # Include cuda and cudnn
include_directories(${CUDNN_INCLUDE_DIR}) include_directories(${CUDNN_INCLUDE_DIR})
include_directories(${CUDA_TOOLKIT_INCLUDE}) include_directories(${CUDA_TOOLKIT_INCLUDE})
endif(NOT WITH_GPU) endif(NOT WITH_GPU)
if(WITH_DSO)
add_definitions(-DPADDLE_USE_DSO)
endif(WITH_DSO)
if(WITH_DOUBLE) if(WITH_DOUBLE)
add_definitions(-DPADDLE_TYPE_DOUBLE) add_definitions(-DPADDLE_TYPE_DOUBLE)
set(ACCURACY double) set(ACCURACY double)
......
#!/bin/bash #!/bin/bash
./submodules.sh ./build_submodules.sh
source ./common.sh source ./common.sh
CMAKE_EXTRA="" CMAKE_EXTRA=""
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
......
#!/bin/bash #!/bin/bash
set -e set -e
WORK_DIR=$PWD
PROJ_ROOT=$(git rev-parse --show-cdup) PROJ_ROOT=$(git rev-parse --show-cdup)
SUBMODULES=$(grep path ${PROJ_ROOT}.gitmodules | sed 's/^.*path = //') SUBMODULES=$(grep path ${PROJ_ROOT}.gitmodules | sed 's/^.*path = //')
...@@ -16,3 +17,4 @@ do ...@@ -16,3 +17,4 @@ do
;; ;;
esac esac
done done
cd $WORK_DIR
...@@ -1874,7 +1874,7 @@ def img_conv_layer(input, ...@@ -1874,7 +1874,7 @@ def img_conv_layer(input,
param_attr.attr["initial_std"] = init_w param_attr.attr["initial_std"] = init_w
param_attr.attr["initial_strategy"] = 0 param_attr.attr["initial_strategy"] = 0
param_attr.attr["initial_smart"] = False param_attr.attr["initial_smart"] = False
if layer_type: if layer_type:
if trans: if trans:
assert layer_type in ["exconvt"] assert layer_type in ["exconvt"]
...@@ -4125,11 +4125,11 @@ def warp_ctc_layer(input, ...@@ -4125,11 +4125,11 @@ def warp_ctc_layer(input,
Note: Note:
- Let num_classes represent the category number. Considering the 'blank' - Let num_classes represent the category number. Considering the 'blank'
label needed by CTC, you need to use (num_classes + 1) as the input size. label needed by CTC, you need to use (num_classes + 1) as the input
Thus, the size of both warp_ctc_layer and 'input' layer should be set to size. Thus, the size of both warp_ctc_layer and 'input' layer should
num_classes + 1. be set to num_classes + 1.
- You can set 'blank' to [0, num_classes - 1], which should be consistent - You can set 'blank' to any value ranged in [0, num_classes], which
as that used in your labels. should be consistent as that used in your labels.
- As a native 'softmax' activation is interated to the warp-ctc library, - As a native 'softmax' activation is interated to the warp-ctc library,
'linear' activation is expected instead in the 'input' layer. 'linear' activation is expected instead in the 'input' layer.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册