32d40eb01a5a61304720fb1c425abef0a1f5b5a0,model.py,Generator,__init__,#Generator#,24
Before Change
class Generator(nn.Module):
def __init__(self):
super(Generator, self).__init__()
self.main = nn.Sequential(
// input is Z, going into a convolution
nn.ConvTranspose2d(100, 32 * 8, 4, 1, 0, bias=False),
nn.BatchNorm2d(32 * 8),
nn.ReLU(True),
// state size. (32*8) x 4 x 4
nn.ConvTranspose2d(32 * 8, 32 * 4, 4, 2, 1, bias=False),
nn.BatchNorm2d(32 * 4),
nn.ReLU(True),
// state size. (32*4) x 8 x 8
nn.ConvTranspose2d(32 * 4, 32 * 2, 4, 2, 1, bias=False),
nn.BatchNorm2d(32 * 2),
nn.ReLU(True),
// state size. (32*2) x 16 x 16
nn.ConvTranspose2d(32 * 2, 3, 4, 2, 1, bias=False),
nn.Tanh()
// state size. (3) x 32 x 32
)
def forward(self, x):
output = self.main(x)
return output
After Change
super(Generator, self).__init__()
self.conv1 = nn.Conv2d(3, 64, (5, 5), (1, 1), (2, 2))
self.conv2 = nn.Conv2d(64, 64, (3, 3), (1, 1), (1, 1))
self.conv3 = nn.Conv2d(64, 32, (3, 3), (1, 1), (1, 1))
self.conv4 = nn.Conv2d(32, 3 * (upscale_factor ** 2), (3, 3), (1, 1), (1, 1))
self.pixel_shuffle = nn.PixelShuffle(upscale_factor)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: leftthomas/SRGAN
Commit Name: 32d40eb01a5a61304720fb1c425abef0a1f5b5a0
Time: 2017-11-19
Author: leftthomas@qq.com
File Name: model.py
Class Name: Generator
Method Name: __init__
Project Name: inspirehep/magpie
Commit Name: 28b8b9d39f53d8327dbf658048a81b7046ae398f
Time: 2017-10-08
Author: stypka@spotify.com
File Name: magpie/nn/models.py
Class Name:
Method Name: cnn
Project Name: danielegrattarola/keras-gat
Commit Name: 9d56361641a64ff73ac630812ecd4964eedbc7aa
Time: 2017-11-09
Author: daniele.grattarola@gmail.com
File Name: gat/main.py
Class Name:
Method Name:
Project Name: Zhaoyi-Yan/Shift-Net_pytorch
Commit Name: bcbef3267f372186f457b9c22feec249bd85b2f6
Time: 2018-12-14
Author: yanzhaoyi@outlook.com
File Name: util/util.py
Class Name:
Method Name: cal_feat_mask