From 85f5818d61c8bb9a4c4524be288828817ca2c8eb Mon Sep 17 00:00:00 2001 From: Wang Huan Date: Sun, 27 Sep 2020 08:34:37 +0000 Subject: [PATCH] modify doc for bilinear_tensor_product, test=develop --- python/paddle/fluid/layers/nn.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 3e7d10f8d1a..f7431604083 100755 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -13228,10 +13228,11 @@ def bilinear_tensor_product(x, Examples: .. code-block:: python - import paddle.fluid as fluid - layer1 = fluid.data("t1", shape=[-1, 5], dtype="float32") - layer2 = fluid.data("t2", shape=[-1, 4], dtype="float32") - tensor = fluid.layers.bilinear_tensor_product(x=layer1, y=layer2, size=1000) + import paddle + paddle.enable_static() + layer1 = paddle.static.data("t1", shape=[-1, 5], dtype="float32") + layer2 = paddle.static.data("t2", shape=[-1, 4], dtype="float32") + tensor = paddle.static.nn.bilinear_tensor_product(x=layer1, y=layer2, size=1000) """ helper = LayerHelper('bilinear_tensor_product', **locals()) dtype = helper.input_dtype('x') -- GitLab