From 32df1fb60077a4a607f43a9f91de7ba855cbac96 Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Tue, 30 Mar 2021 14:36:01 +0800 Subject: [PATCH] modify API nn.Bilinear's doc (#31889) (#31934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改Bilinear的文档,让描述更易懂 --- python/paddle/nn/layer/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/nn/layer/common.py b/python/paddle/nn/layer/common.py index 05d619bd729..400a34d5e52 100644 --- a/python/paddle/nn/layer/common.py +++ b/python/paddle/nn/layer/common.py @@ -571,7 +571,7 @@ class Bilinear(layers.Layer): .. math:: - out_{i} = x1 * W_{i} * {x2^\mathrm{T}}, i=0,1,...,size-1 + out_{i} = x1 * W_{i} * {x2^\mathrm{T}}, i=0,1,...,outfeatures-1 out = out + b @@ -579,7 +579,7 @@ class Bilinear(layers.Layer): - :math:`x1`: the first input contains in1_features elements, shape is [batch_size, in1_features]. - :math:`x2`: the second input contains in2_features elements, shape is [batch_size, in2_features]. - :math:`W_{i}`: the i-th learned weight, shape is [in1_features, in2_features], and learned weight's shape is [out_features, in1_features, in2_features]. - - :math:`out_{i}`: the i-th element of out, shape is [batch_size, out_features]. + - :math:`out_{i}`: the i-th element of out, shape is [batch_size], and out's shape is [batch_size, out_features]. - :math:`b`: the learned bias, shape is [1, out_features]. - :math:`x2^\mathrm{T}`: the transpose of :math:`x2`. -- GitLab