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

因为双线性(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