From 33db82671cf24dcd4d2bf39bd25e9b3151af6a0d Mon Sep 17 00:00:00 2001 From: minqiyang Date: Thu, 25 Oct 2018 18:00:31 +0800 Subject: [PATCH] Polish code test=develop --- python/paddle/fluid/layers/nn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index c9accc7440..7e5389d49d 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -7513,7 +7513,8 @@ def hash(input, hash_size, num_hash=1, name=None): out = fluid.layers.hash(input=x, len(word_dict)) """ helper = LayerHelper('hash', **locals()) - out = helper.create_tmp_variable(helper.input_dtype(), stop_gradient=True) + out = helper.create_variable_for_type_inference( + helper.input_dtype(), stop_gradient=True) helper.append_op( type='hash', inputs={'X': input}, -- GitLab