未验证 提交 70877e91 编写于 作者: T Tingquan Gao 提交者: GitHub

Update + to paddle.add and * to paddle.multiply (#502)

* Updata "*" to "paddle.multiply"

* Update "+" to "paddle.add"
上级 62fd1927
......@@ -89,7 +89,7 @@ class SEBlock(nn.Layer):
excitation = self.excitation(squeeze)
excitation = paddle.clip(x=excitation, min=0, max=1)
excitation = paddle.unsqueeze(excitation, axis=[2, 3])
out = inputs * excitation
out = paddle.multiply(inputs, excitation)
return out
......
......@@ -653,7 +653,7 @@ class HRNet(nn.Layer):
y = last_cls[0]
for idx in range(3):
y = last_cls[idx + 1] + self.cls_head_conv_list[idx](y)
y = paddle.add(last_cls[idx + 1], self.cls_head_conv_list[idx](y))
y = self.conv_last(y)
y = self.pool2d_avg(y)
......
......@@ -131,7 +131,7 @@ class BottleneckBlock(nn.Layer):
if s == 0 or self.stride == 2:
ys.append(conv1(xs[s]))
else:
ys.append(conv1(xs[s] + ys[-1]))
ys.append(conv1(paddle.add(xs[s], ys[-1])))
if self.stride == 1:
ys.append(xs[-1])
else:
......
......@@ -170,7 +170,7 @@ class SELayer(nn.Layer):
excitation = self.excitation(squeeze)
excitation = self.sigmoid(excitation)
excitation = paddle.unsqueeze(excitation, axis=[2, 3])
out = input * excitation
out = paddle.multiply(input, excitation)
return out
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册