Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
d1429ac4
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看板
提交
d1429ac4
编写于
11月 15, 2018
作者:
P
peizhilin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add recordio support
上级
5670e9ea
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
97 addition
and
81 deletion
+97
-81
CMakeLists.txt
CMakeLists.txt
+3
-3
cmake/external/eigen.cmake
cmake/external/eigen.cmake
+6
-4
cmake/external/gflags.cmake
cmake/external/gflags.cmake
+3
-2
cmake/external/glog.cmake
cmake/external/glog.cmake
+2
-1
cmake/external/gtest.cmake
cmake/external/gtest.cmake
+3
-2
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+3
-2
cmake/external/snappy.cmake
cmake/external/snappy.cmake
+10
-2
cmake/external/snappystream.cmake
cmake/external/snappystream.cmake
+35
-26
cmake/external/zlib.cmake
cmake/external/zlib.cmake
+3
-2
paddle/fluid/CMakeLists.txt
paddle/fluid/CMakeLists.txt
+1
-5
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+1
-5
paddle/fluid/operators/CMakeLists.txt
paddle/fluid/operators/CMakeLists.txt
+2
-6
paddle/fluid/operators/reader/create_py_reader_op.cc
paddle/fluid/operators/reader/create_py_reader_op.cc
+1
-1
paddle/fluid/operators/roi_align_op.cc
paddle/fluid/operators/roi_align_op.cc
+3
-3
paddle/fluid/operators/roi_pool_op.cc
paddle/fluid/operators/roi_pool_op.cc
+3
-3
paddle/fluid/operators/space_to_depth_op.cc
paddle/fluid/operators/space_to_depth_op.cc
+1
-1
paddle/fluid/platform/port.h
paddle/fluid/platform/port.h
+6
-4
paddle/fluid/pybind/CMakeLists.txt
paddle/fluid/pybind/CMakeLists.txt
+2
-3
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+3
-6
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+6
-0
未找到文件。
CMakeLists.txt
浏览文件 @
d1429ac4
...
...
@@ -190,11 +190,11 @@ include(external/pybind11) # download pybind11
include
(
external/cares
)
include
(
external/cub
)
include
(
external/xxhash
)
# download xxhash
if
(
NOT WIN32
)
# there is no official support of snappystream, warpctc, nccl, cupti in windows
include
(
external/snappy
)
# download snappy
include
(
external/snappystream
)
# download snappystream
if
(
NOT WIN32
)
# there is no official support of warpctc, nccl, cupti in windows
include
(
external/warpctc
)
# download, build, install warpctc
include
(
cupti
)
endif
(
NOT WIN32
)
...
...
cmake/external/eigen.cmake
浏览文件 @
d1429ac4
...
...
@@ -16,8 +16,9 @@ if(WITH_AMD_GPU)
ExternalProject_Add
(
extern_eigen3
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/sabreshao/hipeigen.git"
GIT_TAG 0cba03ff9f8f9f70bbd92ac5857b031aa8fed6f9
# GIT_REPOSITORY "https://github.com/sabreshao/hipeigen.git"
# GIT_TAG 0cba03ff9f8f9f70bbd92ac5857b031aa8fed6f9
GIT_REPOSITORY
"http://admin@172.20.90.14:8080/r/eigen3.git"
PREFIX
${
EIGEN_SOURCE_DIR
}
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
...
...
@@ -29,10 +30,11 @@ else()
ExternalProject_Add
(
extern_eigen3
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/eigenteam/eigen-git-mirror"
# GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror"
GIT_REPOSITORY
"http://admin@172.20.90.14:8080/r/eigen3.git"
# eigen on cuda9.1 missing header of math_funtions.hpp
# https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen
GIT_TAG 917060c364181f33a735dc023818d5a54f60e54c
#
GIT_TAG 917060c364181f33a735dc023818d5a54f60e54c
PREFIX
${
EIGEN_SOURCE_DIR
}
DOWNLOAD_NAME
"eigen"
UPDATE_COMMAND
""
...
...
cmake/external/gflags.cmake
浏览文件 @
d1429ac4
...
...
@@ -28,8 +28,9 @@ INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIR})
ExternalProject_Add
(
extern_gflags
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/gflags/gflags.git"
GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a
# GIT_REPOSITORY "https://github.com/gflags/gflags.git"
GIT_REPOSITORY
"http://admin@172.20.90.14:8080/r/gflags.git"
# GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a
PREFIX
${
GFLAGS_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
...
...
cmake/external/glog.cmake
浏览文件 @
d1429ac4
...
...
@@ -34,13 +34,14 @@ ELSE()
SET
(
GLOG_REPOSITORY
"https://github.com/google/glog.git"
)
SET
(
GLOG_TAG
"v0.3.5"
)
ENDIF
()
SET
(
GLOG_REPOSITORY
"http://admin@172.20.90.14:8080/r/glog.git"
)
ExternalProject_Add
(
extern_glog
${
EXTERNAL_PROJECT_LOG_ARGS
}
DEPENDS gflags
GIT_REPOSITORY
${
GLOG_REPOSITORY
}
GIT_TAG
${
GLOG_TAG
}
#
GIT_TAG ${GLOG_TAG}
PREFIX
${
GLOG_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
...
...
cmake/external/gtest.cmake
浏览文件 @
d1429ac4
...
...
@@ -43,8 +43,9 @@ IF(WITH_TESTING)
extern_gtest
${
EXTERNAL_PROJECT_LOG_ARGS
}
DEPENDS
${
GTEST_DEPENDS
}
GIT_REPOSITORY
"https://github.com/google/googletest.git"
GIT_TAG
"release-1.8.0"
# GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_REPOSITORY
"http://admin@172.20.90.14:8080/r/gtest.git"
# GIT_TAG "release-1.8.0"
PREFIX
${
GTEST_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
...
...
cmake/external/protobuf.cmake
浏览文件 @
d1429ac4
...
...
@@ -202,8 +202,9 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
SET
(
OPTIONAL_ARGS
${
OPTIONAL_ARGS
}
"-DCMAKE_GENERATOR_PLATFORM=x64"
)
ENDIF
()
SET
(
PROTOBUF_REPO
"https://github.com/google/protobuf.git"
)
SET
(
PROTOBUF_TAG
"9f75c5aa851cd877fb0d93ccc31b8567a6706546"
)
# SET(PROTOBUF_REPO "https://github.com/google/protobuf.git")
# SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546")
SET
(
PROTOBUF_REPO http://admin@172.20.90.14:8080/r/protobuf.git
)
IF
(
MOBILE_INFERENCE
)
# The reason why the official version is not used is described in
# https://github.com/PaddlePaddle/Paddle/issues/6114
...
...
cmake/external/snappy.cmake
浏览文件 @
d1429ac4
...
...
@@ -24,7 +24,11 @@ set(SNAPPY_SOURCES_DIR ${THIRD_PARTY_PATH}/snappy)
set
(
SNAPPY_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/snappy
)
set
(
SNAPPY_INCLUDE_DIR
"
${
SNAPPY_INSTALL_DIR
}
/include"
CACHE PATH
"snappy include directory."
FORCE
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_INSTALL_DIR
}
/lib/libsnappy.a"
)
if
(
WIN32
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_INSTALL_DIR
}
/lib/snappy.lib"
)
else
(
WIN32
)
set
(
SNAPPY_LIBRARIES
"
${
SNAPPY_INSTALL_DIR
}
/lib/libsnappy.a"
)
endif
(
WIN32
)
ExternalProject_Add
(
extern_snappy
...
...
@@ -34,8 +38,12 @@ ExternalProject_Add(
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
-DCMAKE_C_FLAGS_DEBUG=
${
CMAKE_C_FLAGS_DEBUG
}
-DCMAKE_C_FLAGS_RELEASE=
${
CMAKE_C_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_CXX_FLAGS_RELEASE=
${
CMAKE_CXX_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS_DEBUG=
${
CMAKE_CXX_FLAGS_DEBUG
}
-DCMAKE_INSTALL_PREFIX=
${
SNAPPY_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR=
${
SNAPPY_INSTALL_DIR
}
/lib
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
...
...
cmake/external/snappystream.cmake
浏览文件 @
d1429ac4
...
...
@@ -18,36 +18,45 @@ ENDIF()
include
(
ExternalProject
)
# NOTE: snappy is needed when linking with recordio
set
(
SNAPPYSTREAM_SOURCES_DIR
${
THIRD_PARTY_PATH
}
/snappy_stream
)
set
(
SNAPPYSTREAM_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/snappy_stream
)
set
(
SNAPPYSTREAM_INCLUDE_DIR
"
${
SNAPPYSTREAM_INSTALL_DIR
}
/include"
CACHE PATH
"snappy stream include directory."
FORCE
)
set
(
SNAPPYSTREAM_LIBRARIES
"
${
SNAPPYSTREAM_INSTALL_DIR
}
/lib/libsnappystream.a"
)
ExternalProject_Add
(
extern_snappystream
GIT_REPOSITORY
"https://github.com/hoxnox/snappystream.git"
GIT_TAG
"0.2.8"
PREFIX
${
SNAPPYSTREAM_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
-DCMAKE_INSTALL_PREFIX=
${
SNAPPY_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR=
${
SNAPPY_INSTALL_DIR
}
/lib
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
-DSNAPPY_ROOT=
${
SNAPPY_INSTALL_DIR
}
${
EXTERNAL_OPTIONAL_ARGS
}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=
${
SNAPPYSTREAM_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR:PATH=
${
SNAPPYSTREAM_INSTALL_DIR
}
/lib
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
DEPENDS snappy
)
if
(
WIN32
)
# Fix me, VS2015 come without VLA support
set
(
SNAPPYSTREAM_LIBRARIES
"
${
SNAPPYSTREAM_INSTALL_DIR
}
/lib/snappystream.lib"
)
MESSAGE
(
WARNING,
"In windows, snappystream has no compile support for windows,
please build it manually and put it at "
${
SNAPPYSTREAM_INSTALL_DIR
}
)
else
(
WIN32
)
set
(
SNAPPYSTREAM_LIBRARIES
"
${
SNAPPYSTREAM_INSTALL_DIR
}
/lib/libsnappystream.a"
)
ExternalProject_Add
(
extern_snappystream
GIT_REPOSITORY
"https://github.com/hoxnox/snappystream.git"
GIT_TAG
"0.2.8"
PREFIX
${
SNAPPYSTREAM_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
-DCMAKE_C_FLAGS_DEBUG=
${
CMAKE_C_FLAGS_DEBUG
}
-DCMAKE_C_FLAGS_RELEASE=
${
CMAKE_C_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS=
${
CMAKE_CXX_FLAGS
}
-DCMAKE_CXX_FLAGS_RELEASE=
${
CMAKE_CXX_FLAGS_RELEASE
}
-DCMAKE_CXX_FLAGS_DEBUG=
${
CMAKE_CXX_FLAGS_DEBUG
}
-DCMAKE_INSTALL_PREFIX=
${
SNAPPY_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR=
${
SNAPPY_INSTALL_DIR
}
/lib
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_BUILD_TYPE=
${
THIRD_PARTY_BUILD_TYPE
}
-DSNAPPY_ROOT=
${
SNAPPY_INSTALL_DIR
}
${
EXTERNAL_OPTIONAL_ARGS
}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=
${
SNAPPYSTREAM_INSTALL_DIR
}
-DCMAKE_INSTALL_LIBDIR:PATH=
${
SNAPPYSTREAM_INSTALL_DIR
}
/lib
-DCMAKE_BUILD_TYPE:STRING=
${
THIRD_PARTY_BUILD_TYPE
}
DEPENDS snappy
)
endif
(
WIN32
)
add_library
(
snappystream STATIC IMPORTED GLOBAL
)
set_property
(
TARGET snappystream PROPERTY IMPORTED_LOCATION
${
SNAPPYSTREAM_LIBRARIES
}
)
...
...
cmake/external/zlib.cmake
浏览文件 @
d1429ac4
...
...
@@ -31,8 +31,9 @@ INCLUDE_DIRECTORIES(${THIRD_PARTY_PATH}/install) # For Paddle code to include zl
ExternalProject_Add
(
extern_zlib
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/madler/zlib.git"
GIT_TAG
"v1.2.8"
# GIT_REPOSITORY "https://github.com/madler/zlib.git"
GIT_REPOSITORY
"http://admin@172.20.90.14:8080/r/zlib.git"
# GIT_TAG "v1.2.8"
PREFIX
${
ZLIB_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
...
...
paddle/fluid/CMakeLists.txt
浏览文件 @
d1429ac4
...
...
@@ -3,13 +3,9 @@ add_subdirectory(platform)
add_subdirectory
(
framework
)
add_subdirectory
(
operators
)
add_subdirectory
(
string
)
add_subdirectory
(
pybind
)
if
(
NOT WIN32
)
add_subdirectory
(
recordio
)
endif
(
NOT WIN32
)
add_subdirectory
(
pybind
)
# NOTE: please add subdirectory inference at last.
add_subdirectory
(
inference
)
add_subdirectory
(
train
)
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
d1429ac4
...
...
@@ -68,11 +68,7 @@ if(WITH_GPU)
else
()
cc_test
(
mixed_vector_test SRCS mixed_vector_test.cc DEPS place memory device_context tensor
)
endif
()
if
(
NOT WIN32
)
cc_library
(
lod_tensor SRCS lod_tensor.cc DEPS ddim place tensor framework_proto recordio version
)
else
()
cc_library
(
lod_tensor SRCS lod_tensor.cc DEPS ddim place tensor framework_proto version
)
endif
(
NOT WIN32
)
cc_library
(
lod_tensor SRCS lod_tensor.cc DEPS ddim place tensor framework_proto recordio version
)
cc_test
(
lod_tensor_test SRCS lod_tensor_test.cc DEPS lod_tensor memory
)
nv_test
(
lod_tensor_gpu_test SRCS lod_tensor_test.cu DEPS lod_tensor
)
...
...
paddle/fluid/operators/CMakeLists.txt
浏览文件 @
d1429ac4
...
...
@@ -95,7 +95,8 @@ function(op_library TARGET)
foreach
(
windows_unsupport_op
"nccl_op"
"gen_nccl_id_op"
"warpctc_op"
"hierarchical_sigmoid_op"
"crf_decoding_op"
"select_op"
"lstmp_op"
"gru_op"
"fusion_gru_op"
"lstm_op"
"fusion_lstm_op"
"cumsum_op"
"fusion_seqconv_eltadd_relu_op"
"channel_send_op"
"channel_create_op"
"channel_close_op"
"channel_recv_op"
"fusion_seqexpand_concat_fc_op"
"attention_lstm_op"
"fused_embedding_fc_lstm_op"
"fc_op"
)
"fusion_seqexpand_concat_fc_op"
"attention_lstm_op"
"fused_embedding_fc_lstm_op"
"fc_op"
)
if
(
"
${
TARGET
}
"
STREQUAL
"
${
windows_unsupport_op
}
"
)
return
()
endif
()
...
...
@@ -225,7 +226,6 @@ if(WITH_DISTRIBUTE)
ADD_LIBRARY
(
ibverbs SHARED IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET ibverbs PROPERTY IMPORTED_LOCATION
${
IBVERBS_LIBRARY
}
)
find_library
(
RDMACM_LIBRARY NAMES rdmacm
)
ADD_LIBRARY
(
rdmacm SHARED IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET rdmacm PROPERTY IMPORTED_LOCATION
${
RDMACM_LIBRARY
}
)
...
...
@@ -338,11 +338,7 @@ foreach(src ${GENERAL_OPS})
endforeach
()
file
(
APPEND
${
pybind_file
}
"USE_OP(less_than);
\n
USE_OP(logical_and);
\n
USE_NO_KERNEL_OP(read_from_array);
\n
"
)
if
(
NOT WIN32
)
add_subdirectory
(
reader
)
endif
(
NOT WIN32
)
foreach
(
src
${
READER_LIBRARY
}
)
set
(
OP_LIBRARY
${
src
}
${
OP_LIBRARY
}
)
endforeach
()
...
...
paddle/fluid/operators/reader/create_py_reader_op.cc
浏览文件 @
d1429ac4
...
...
@@ -74,7 +74,7 @@ class CreatePyReaderOpMaker : public FileReaderMakerBase {
"Name of the `LoDTensorBlockingQueueHolder` variable"
);
AddComment
(
R"DOC(
Create PyReader to support LoDTensor data feeding in Python side.
Create PyReader to support LoDTensor data feeding in Python side.
)DOC"
);
}
};
...
...
paddle/fluid/operators/roi_align_op.cc
浏览文件 @
d1429ac4
...
...
@@ -35,10 +35,10 @@ class ROIAlignOp : public framework::OperatorWithKernel {
"The format of input tensor is NCHW."
);
PADDLE_ENFORCE
(
rois_dims
.
size
()
==
2
,
"ROIs should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]."
);
"given as [[x1, y1, x2, y2],
...
]."
);
PADDLE_ENFORCE
(
rois_dims
[
1
]
==
4
,
"ROIs should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]."
);
"given as [[x1, y1, x2, y2],
...
]."
);
int
pooled_height
=
ctx
->
Attrs
().
Get
<
int
>
(
"pooled_height"
);
int
pooled_width
=
ctx
->
Attrs
().
Get
<
int
>
(
"pooled_width"
);
float
spatial_scale
=
ctx
->
Attrs
().
Get
<
float
>
(
"spatial_scale"
);
...
...
@@ -103,7 +103,7 @@ class ROIAlignOpMaker : public framework::OpProtoAndCheckerMaker {
"(LoDTensor), "
"ROIs (Regions of Interest) to pool over. "
"should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]. "
"given as [[x1, y1, x2, y2],
...
]. "
"(x1, y1) is the top left coordinates, and "
"(x2, y2) is the bottom right coordinates."
);
AddOutput
(
"Out"
,
...
...
paddle/fluid/operators/roi_pool_op.cc
浏览文件 @
d1429ac4
...
...
@@ -40,10 +40,10 @@ class ROIPoolOp : public framework::OperatorWithKernel {
"The format of input tensor is NCHW."
);
PADDLE_ENFORCE
(
rois_dims
.
size
()
==
2
,
"ROIs should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]."
);
"given as [[x1, y1, x2, y2],
...
]."
);
PADDLE_ENFORCE
(
rois_dims
[
1
]
==
kROISize
,
"ROIs should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]."
);
"given as [[x1, y1, x2, y2],
...
]."
);
int
pooled_height
=
ctx
->
Attrs
().
Get
<
int
>
(
"pooled_height"
);
int
pooled_width
=
ctx
->
Attrs
().
Get
<
int
>
(
"pooled_width"
);
...
...
@@ -110,7 +110,7 @@ class ROIPoolOpMaker : public framework::OpProtoAndCheckerMaker {
"(LoDTensor), "
"ROIs (Regions of Interest) to pool over. "
"should be a 2-D LoDTensor of shape (num_rois, 4)"
"given as [[x1, y1, x2, y2],
…
]. "
"given as [[x1, y1, x2, y2],
...
]. "
"Where batch_id is the id of the data, "
"(x1, y1) is the top left coordinates, and "
"(x2, y2) is the bottom right coordinates."
);
...
...
paddle/fluid/operators/space_to_depth_op.cc
浏览文件 @
d1429ac4
...
...
@@ -86,7 +86,7 @@ class SpaceToDepthOpMaker : public framework::OpProtoAndCheckerMaker {
.
GreaterThan
(
1
);
AddComment
(
R"DOC(
reorg operator used in Yolo v2.
The equation is: C2 = C1/blocksize * blocksize, W2 = W1
∗ blocksize + offset % blocksize, H2 = H1 ∗ blocksize + offset / blocksize,
The equation is: C2 = C1/blocksize * blocksize, W2 = W1
* blocksize + offset % blocksize, H2 = H1 * blocksize + offset / blocksize,
Reshape Input(X) into the shape according to Attr(blocksize). The
data in Input(X) are unchanged.
...
...
paddle/fluid/platform/port.h
浏览文件 @
d1429ac4
...
...
@@ -132,10 +132,12 @@ static void MkDir(const char *path) {
}
}
#else
CreateDirectory
(
path
,
NULL
);
auto
errorno
=
GetLastError
();
if
(
errorno
!=
ERROR_ALREADY_EXISTS
)
{
throw
std
::
runtime_error
(
path_error
);
BOOL
return_value
=
CreateDirectory
(
path
,
NULL
);
if
(
!
return_value
)
{
auto
errorno
=
GetLastError
();
if
(
errorno
!=
ERROR_ALREADY_EXISTS
)
{
throw
std
::
runtime_error
(
path_error
);
}
}
#endif // !_WIN32
}
...
...
paddle/fluid/pybind/CMakeLists.txt
浏览文件 @
d1429ac4
set
(
PYBIND_DEPS pybind python proto_desc memory executor prune
feed_fetch_method pass_builder
)
set
(
PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc
)
set
(
PYBIND_DEPS pybind python proto_desc memory executor prune feed_fetch_method pass_builder
)
set
(
PYBIND_SRCS pybind.cc exception.cc protobuf.cc const_value.cc
recordio.cc
)
if
(
NOT WIN32
)
list
(
APPEND PYBIND_DEPS parallel_executor profiler
)
list
(
APPEND PYBIND_SRCS recordio.cc
)
endif
(
NOT WIN32
)
if
(
WITH_PYTHON
)
if
(
WITH_AMD_GPU
)
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
d1429ac4
...
...
@@ -357,19 +357,16 @@ All parameter, weight, gradient are variables in Paddle.
return
self
.
GetMutable
<
platform
::
Communicator
>
();
},
py
::
return_value_policy
::
reference
)
#endif
.
def
(
"get_reader"
,
[](
Variable
&
self
)
->
framework
::
ReaderHolder
*
{
PADDLE_ENFORCE
(
self
.
IsType
<
framework
::
ReaderHolder
>
());
return
self
.
GetMutable
<
framework
::
ReaderHolder
>
();
},
py
::
return_value_policy
::
reference
)
#endif
;
py
::
return_value_policy
::
reference
);
#if !defined(_WIN32)
py
::
class_
<
framework
::
ReaderHolder
>
(
m
,
"Reader"
,
""
)
.
def
(
"reset"
,
&
framework
::
ReaderHolder
::
ResetAll
);
#endif
using
LoDTensorBlockingQueue
=
::
paddle
::
operators
::
reader
::
LoDTensorBlockingQueue
;
...
...
@@ -914,9 +911,9 @@ All parameter, weight, gradient are variables in Paddle.
pybind11
::
gil_scoped_release
release
;
self
.
Run
(
fetch_tensors
,
fetched_var_name
);
});
#endif
BindRecordIOWriter
(
&
m
);
#endif
return
m
.
ptr
();
}
}
// namespace pybind
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
d1429ac4
...
...
@@ -169,6 +169,12 @@ __all__ = [
'bilinear_tensor_product'
,
]
# To avoid the api checker complains
if
os
.
name
==
'nt'
:
__all__
.
remove
(
'dynamic_lstm'
)
__all__
.
remove
(
'crf_decoding'
)
__all__
.
remove
(
'roi_pool'
)
def
fc
(
input
,
size
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录