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

* Updata "*" to "paddle.multiply"

* Update "+" to "paddle.add"
pull/503/head
Tingquan Gao 2020-12-18 16:07:18 +08:00 committed by GitHub
parent 62fd192784
commit 70877e91e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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