Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
9669ddd9
P
Paddle
项目概览
机器未来
/
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看板
提交
9669ddd9
编写于
9月 07, 2017
作者:
D
dongzhihong
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into backward
上级
0e4b60ac
7cae3adc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
7 deletion
+18
-7
.travis.yml
.travis.yml
+2
-3
CMakeLists.txt
CMakeLists.txt
+2
-2
doc/design/functions_operators_layers.md
doc/design/functions_operators_layers.md
+3
-2
paddle/utils/Util.cpp
paddle/utils/Util.cpp
+4
-0
paddle/utils/Util.h
paddle/utils/Util.h
+7
-0
未找到文件。
.travis.yml
浏览文件 @
9669ddd9
...
...
@@ -21,7 +21,6 @@ addons:
-
python
-
python-pip
-
python2.7-dev
-
python-numpy
-
python-wheel
-
libboost-dev
-
curl
...
...
@@ -35,8 +34,8 @@ before_install:
-
if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
# Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
# protobuf version.
-
pip install -r $TRAVIS_BUILD_DIR/python/requirements.txt
-
pip install wheel sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit LinkChecker
-
sudo
pip install -r $TRAVIS_BUILD_DIR/python/requirements.txt
-
sudo
pip install wheel sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit LinkChecker
-
curl https://glide.sh/get | bash
-
eval "$(GIMME_GO_VERSION=1.8.3 gimme)"
-
go get -u github.com/alecthomas/gometalinter
...
...
CMakeLists.txt
浏览文件 @
9669ddd9
...
...
@@ -65,8 +65,8 @@ if(NOT CMAKE_BUILD_TYPE)
endif
()
if
(
ANDROID
)
if
(
${
CMAKE_SYSTEM_VERSION
}
VERSION_LESS
"
21
"
)
message
(
FATAL_ERROR
"Unsupport standalone toolchains with Android API level lower than
21
"
)
if
(
${
CMAKE_SYSTEM_VERSION
}
VERSION_LESS
"
16
"
)
message
(
FATAL_ERROR
"Unsupport standalone toolchains with Android API level lower than
16
"
)
endif
()
set
(
WITH_GPU OFF CACHE STRING
...
...
doc/design/functions_operators_layers.md
浏览文件 @
9669ddd9
...
...
@@ -86,12 +86,13 @@ def layer.fc(X):
We'd like to have Python bindings to operators in package
`paddle.operator`
, and Python compositions of operators in package
`paddle.layer`
. So we have the following concepts in above illustrative example:
```
| C++ functions/functors | mul | add | | |
|------------------------|--------------|--------------|-------------|----------|
| C++ operator class | mulOp | addOp | FCOp | |
| Python binding | operator.mul | operator.add | operator.fc | |
| Python function | | | | layer.fc |
```
This is how we differentiate layer and operators in PaddlePaddle:
...
...
paddle/utils/Util.cpp
浏览文件 @
9669ddd9
...
...
@@ -320,6 +320,9 @@ void loadFileList(const std::string& fileListFileName,
}
double
getMemoryUsage
()
{
#if defined(__ANDROID__)
return
0.0
;
#else
FILE
*
fp
=
fopen
(
"/proc/meminfo"
,
"r"
);
CHECK
(
fp
)
<<
"failed to fopen /proc/meminfo"
;
size_t
bufsize
=
256
*
sizeof
(
char
);
...
...
@@ -357,6 +360,7 @@ double getMemoryUsage() {
delete
[]
buf
;
double
usedMem
=
1.0
-
1.0
*
(
freeMem
+
bufMem
+
cacheMem
)
/
totalMem
;
return
usedMem
;
#endif
}
SyncThreadPool
*
getGlobalSyncThreadPool
()
{
...
...
paddle/utils/Util.h
浏览文件 @
9669ddd9
...
...
@@ -33,6 +33,13 @@ limitations under the License. */
#include "Flags.h"
#include "hl_gpu.h"
#if defined(__ANDROID__) && (__ANDROID_API__ < 21)
inline
int
rand_r
(
unsigned
int
*
seedp
)
{
(
void
)
seedp
;
return
rand
();
}
#endif
/**
* Loop over the elements in a container
* TODO(yuyang18): It's this foreach useful? Why not use C++ 11 foreach,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录