553f777ad245ef3caa799151e34e6cc37bbcb11a,chainer_/chainercv2/models/common.py,SEBlock,__call__,#SEBlock#Any#,982
Before Change
def __call__(self, x):
w = F.average_pooling_2d(x, ksize=x.shape[2:])
w = self.conv1(w)
w = self.activ(w)
w = self.conv2(w)
w = self.sigmoid(w)
x = x * w
return x
After Change
def __call__(self, x):
w = F.average_pooling_2d(x, ksize=x.shape[2:])
if not self.use_conv:
w = F.reshape(w, shape=(w.shape[0], -1))
w = self.conv1(w) if self.use_conv else self.fc1(w)
w = self.activ(w)
w = self.conv2(w) if self.use_conv else self.fc2(w)
w = self.sigmoid(w)
if not self.use_conv:
w = F.expand_dims(F.expand_dims(w, axis=2), axis=3)
x = x * w
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 18
Instances Project Name: osmr/imgclsmob
Commit Name: 553f777ad245ef3caa799151e34e6cc37bbcb11a
Time: 2020-02-18
Author: osemery@gmail.com
File Name: chainer_/chainercv2/models/common.py
Class Name: SEBlock
Method Name: __call__
Project Name: osmr/imgclsmob
Commit Name: 553f777ad245ef3caa799151e34e6cc37bbcb11a
Time: 2020-02-18
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/common.py
Class Name: SEBlock
Method Name: forward
Project Name: osmr/imgclsmob
Commit Name: 553f777ad245ef3caa799151e34e6cc37bbcb11a
Time: 2020-02-18
Author: osemery@gmail.com
File Name: gluon/gluoncv2/models/common.py
Class Name: SEBlock
Method Name: hybrid_forward
Project Name: osmr/imgclsmob
Commit Name: 553f777ad245ef3caa799151e34e6cc37bbcb11a
Time: 2020-02-18
Author: osemery@gmail.com
File Name: chainer_/chainercv2/models/common.py
Class Name: SEBlock
Method Name: __call__