Skip to content

Commit 0df8b63

Browse files
authored
Merge pull request PaddlePaddle#924 from reyoung/feature/add_faq
Refine FAQ for git submodule
2 parents f94a0cc + 651d323 commit 0df8b63

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

doc/faq/index_cn.rst

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ PaddlePaddle支持Sparse的训练,sparse训练需要训练特征是 :code:`spa
113113
* 具体的多机训练方法参考 `多机训练文档 <../ui/data_provider/pydataprovider2.html#provider>`_ 。
114114

115115

116-
3. 遇到“非法指令”或者是“illegal instruction”
116+
3. 遇到“非法指令”或者是“illegal instruction”
117117
--------------------------------------------
118118

119119
PaddlePaddle使用avx SIMD指令提高cpu执行效率,因此错误的使用二进制发行版可能会导致这种错误,请选择正确的版本。
@@ -140,7 +140,7 @@ PaddlePaddle使用avx SIMD指令提高cpu执行效率,因此错误的使用二
140140

141141
.. code-block:: python
142142
143-
hidden = fc_layer(input=ipt, param_attr=ParamAttr(initial_max=1.0, initial_min=-1.0),
143+
hidden = fc_layer(input=ipt, param_attr=ParamAttr(initial_max=1.0, initial_min=-1.0),
144144
bias_attr=ParamAttr(initial_mean=1.0, initial_std=0.0))
145145
146146
上述代码将bias全部初始化为1.0, 同时将参数初始化为 :code:`[1.0, -1.0]` 的均匀分布。
@@ -156,8 +156,8 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字
156156

157157
这里 :code:`hidden_a` 和 :code:`hidden_b` 使用了同样的parameter和bias。并且softmax层的两个输入也使用了同样的参数 :code:`softmax_param`。
158158

159-
7. *-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
160-
---------------------------------------------------------------------------
159+
7. \*-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
160+
------------------------------------------------------------------------
161161

162162
出现这个问题的主要原因是,系统编译wheel包的时候,使用的 :code:`wheel` 包是最新的,
163163
而系统中的 :code:`pip` 包比较老。具体的解决方法是,更新 :code:`pip` 包并重新编译PaddlePaddle。
@@ -190,14 +190,14 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字
190190
41 - test_config_parser (Failed)
191191
42 - test_swig_api (Failed)
192192
43 - layers_test (Failed)
193-
193+
194194
并且查询PaddlePaddle单元测试的日志,提示:
195195

196196
.. code-block:: bash
197-
197+
198198
paddle package is already in your PYTHONPATH. But unittest need a clean environment.
199199
Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'.
200-
200+
201201
解决办法是:
202202

203203
* 卸载PaddlePaddle包 :code:`pip uninstall paddle`, 清理掉老旧的PaddlePaddle安装包,使得单元测试有一个干净的环境。如果PaddlePaddle包已经在python的site-packages里面,单元测试会引用site-packages里面的python包,而不是源码目录里 :code:`/python` 目录下的python包。同时,即便设置 :code:`PYTHONPATH` 到 :code:`/python` 也没用,因为python的搜索路径是优先已经安装的python包。
@@ -225,7 +225,7 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字
225225
用户强制指定特定的Python版本,具体操作如下:
226226

227227
.. code-block:: bash
228-
228+
229229
cmake .. -DPYTHON_EXECUTABLE=<exc_path> -DPYTHON_LIBRARY=<lib_path> -DPYTHON_INCLUDE_DIR=<inc_path>
230230
231231
用户需要指定本机上Python的路径:``<exc_path>``, ``<lib_path>``, ``<inc_path>``
@@ -238,7 +238,7 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字
238238
.. code-block:: bash
239239
240240
[libprotobuf ERROR google/protobuf/io/coded_stream.cc:171] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
241-
F1205 14:59:50.295174 14703 TrainerConfigHelper.cpp:59] Check failed: m->conf.ParseFromString(configProtoStr)
241+
F1205 14:59:50.295174 14703 TrainerConfigHelper.cpp:59] Check failed: m->conf.ParseFromString(configProtoStr)
242242
243243
可能的原因是:传给dataprovider的某一个args过大,一般是由于直接传递大字典导致的。错误的define_py_data_sources2类似:
244244

@@ -284,3 +284,22 @@ PaddlePaddle的参数使用名字 :code:`name` 作为参数的ID,相同名字
284284
.. code-block:: bash
285285
286286
paddle train --use_gpu=true --trainer_count=2 --gpu_id=2
287+
288+
12. 编译源码提示warp-ctc/include/ctc.h 找不到的情况
289+
---------------------------------------------------
290+
291+
目前Paddle使用\ :code:`git submodule`\ 来引用一些第三方模块。简单的\
292+
:code:`git clone`\ 命令不能得到第三方模块的代码。需要使用\:
293+
294+
.. code-block:: bash
295+
296+
git clone --recursive https://github.com/PaddlePaddle/Paddle.git
297+
298+
来获取所有源码。对于已经clone的git版本库,可以在Paddle的源码目录中执行\:
299+
300+
.. code-block:: bash
301+
302+
git submodule init
303+
git submodule update
304+
305+
来获得所有第三方模块。

0 commit comments

Comments
 (0)