提交 2fec8c5d 编写于 作者: M minqiyang

Polish code

test=develop
上级 7f7af5d4
...@@ -371,7 +371,7 @@ function run_test() { ...@@ -371,7 +371,7 @@ function run_test() {
Running unit tests ... Running unit tests ...
======================================== ========================================
EOF EOF
# ctest --output-on-failure ctest --output-on-failure
# make install should also be test when unittest # make install should also be test when unittest
make install -j `nproc` make install -j `nproc`
pip install ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl pip install ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl
......
...@@ -7504,11 +7504,12 @@ def hash(input, hash_size, num_hash=1, name=None): ...@@ -7504,11 +7504,12 @@ def hash(input, hash_size, num_hash=1, name=None):
input (Variable): The input variable which is a one-hot word. input (Variable): The input variable which is a one-hot word.
hash_size (int): The space size for hash algorithm. hash_size (int): The space size for hash algorithm.
num_hash (int): The times of hash, default 1. num_hash (int): The times of hash, default 1.
name (str, default None): The name of this layer.
Returns: Returns:
Variable: The hash result variable which is a LoDTensor. Variable: The hash result variable which is a LoDTensor.
Examples: Examples:
.. code-block:: python .. code-block:: python
word_dict = paddle.dataset.imdb.word_dict() word_dict = paddle.dataset.imdb.word_dict()
x = fluid.layers.data(shape[1], dtype='int32', lod_level=1) x = fluid.layers.data(shape[1], dtype='int32', lod_level=1)
out = fluid.layers.hash(input=x, len(word_dict)) out = fluid.layers.hash(input=x, len(word_dict))
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册