PGL icon indicating copy to clipboard operation
PGL copied to clipboard

在图里面直接加入线性变换或者双线性(nn.BiLinear)为啥会运行变慢很多,而且保存的模型超大,

Open Zhangbeibei1991 opened this issue 4 years ago • 1 comments

魔改transformer_Conv, 如图 image image

Zhangbeibei1991 avatar Sep 13 '21 07:09 Zhangbeibei1991

因为双线性(nn.BiLinear) 会产生一个 in_feat1 * in_feat2 * out_feat 的参数, 大概是原本线性(nn.Linear)的 in_feat2 倍。所以又大又慢。 ref: https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Bilinear_cn.html#bilinear

sys1874 avatar Sep 22 '21 08:09 sys1874