5576495ae2d425855fb06920e8ce0f574e6ac212,model.py,CapsuleGenerator,forward,#CapsuleGenerator#Any#,29
Before Change
self.pixel_shuffle = nn.PixelShuffle(upscale_factor)
def forward(self, x):
x = self.lrelu(self.conv1(x))
x = self.lrelu(self.conv2(x))
x = self.lrelu(self.conv3(x))
x = self.lrelu(self.conv4(x))
x = self.conv5(x)
// capsules squash
x = torch.cat([squash(capsule) for capsule in torch.chunk(x, chunks=16, dim=1)], dim=1)
x = self.lrelu(self.conv6(x))
x = F.sigmoid(self.pixel_shuffle(x))
return x
class CapsuleDiscriminator(nn.Module):
def __init__(self):
After Change
block2 = self.block2(block1)
block3 = self.block3(block2)
block4 = self.block4(block3)
block5 = self.block5(block4)
block6 = self.block6(block5)
block7 = self.block7(block6)
block8 = self.block8(block1 + block7)
return (F.tanh(block8) + 1) / 2
class Discriminator(nn.Module):
def __init__(self):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: leftthomas/SRGAN
Commit Name: 5576495ae2d425855fb06920e8ce0f574e6ac212
Time: 2017-12-01
Author: leftthomas@qq.com
File Name: model.py
Class Name: CapsuleGenerator
Method Name: forward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 685126644ae540be72eb662527269a0395e2c9eb
Time: 2017-09-05
Author: bpeters@coli.uni-saarland.de
File Name: onmt/IO.py
Class Name:
Method Name: make_features
Project Name: Cadene/pretrained-models.pytorch
Commit Name: b2074ddf9d8bc2069d66976fea58a52f40238496
Time: 2017-11-16
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/nasnet.py
Class Name: Cell0
Method Name: forward
Project Name: osmr/imgclsmob
Commit Name: 662eff0303e51ff5b60c60c49b03feed2e03d6bb
Time: 2018-08-24
Author: osemery@gmail.com
File Name: pytorch/models/nasnet.py
Class Name: ReductionCell1
Method Name: forward