From 2fec8c5d9a888a1c755fd5dca4a26b27f5c4db96 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Sun, 28 Oct 2018 19:36:05 +0800 Subject: [PATCH] Polish code test=develop --- paddle/scripts/paddle_build.sh | 2 +- python/paddle/fluid/layers/nn.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index f5704473e6d..d6b9d1108c5 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -371,7 +371,7 @@ function run_test() { Running unit tests ... ======================================== EOF - # ctest --output-on-failure + ctest --output-on-failure # make install should also be test when unittest make install -j `nproc` pip install ${INSTALL_PREFIX:-/paddle/build}/opt/paddle/share/wheels/*.whl diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 7e5389d49dd..99f1a911192 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -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. hash_size (int): The space size for hash algorithm. num_hash (int): The times of hash, default 1. + name (str, default None): The name of this layer. Returns: Variable: The hash result variable which is a LoDTensor. Examples: .. 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) out = fluid.layers.hash(input=x, len(word_dict)) """ -- GitLab