Update + to paddle.add and * to paddle.multiply (#502)
* Updata "*" to "paddle.multiply" * Update "+" to "paddle.add"pull/503/head
parent
62fd192784
commit
70877e91e5
ppcls/modeling/architectures
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue