6fa5098c419e83e1c4d2d55b492eafdfe6a006ef,pro_gan_pytorch/CustomLayers.py,_equalized_conv2d,forward,#_equalized_conv2d#Any#,35
Before Change
:param x: input
:return: y => output
try:
dev_scale = self.scale.to(x.get_device())
except RuntimeError:
dev_scale = self.scale
x = self.conv(x.mul(dev_scale))
if self.use_bias:
return x + self.bias.view(1, -1, 1, 1).expand_as(x)
return x
class _equalized_deconv2d(th.nn.Module):
Transpose convolution using the equalized learning rate
After Change
from torch.nn.functional import conv2d
return conv2d(input=x,
weight=self.weight * self.scale, // scale the weight on runtime
bias=self.bias if self.use_bias else None,
stride=self.stride,
padding=self.pad)
def extra_repr(self):
return ", ".join(map(str, self.weight.shape))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 28
Instances
Project Name: akanimax/pro_gan_pytorch
Commit Name: 6fa5098c419e83e1c4d2d55b492eafdfe6a006ef
Time: 2018-12-10
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/CustomLayers.py
Class Name: _equalized_conv2d
Method Name: forward
Project Name: akanimax/pro_gan_pytorch
Commit Name: 6fa5098c419e83e1c4d2d55b492eafdfe6a006ef
Time: 2018-12-10
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/CustomLayers.py
Class Name: _equalized_deconv2d
Method Name: forward
Project Name: akanimax/pro_gan_pytorch
Commit Name: 6fa5098c419e83e1c4d2d55b492eafdfe6a006ef
Time: 2018-12-10
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/CustomLayers.py
Class Name: _equalized_linear
Method Name: forward
Project Name: akanimax/pro_gan_pytorch
Commit Name: 6fa5098c419e83e1c4d2d55b492eafdfe6a006ef
Time: 2018-12-10
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/CustomLayers.py
Class Name: _equalized_conv2d
Method Name: forward