47c6377324b4906ed5e133011350c22d1f809466,scripts/gan/srgan/train_srgan.py,SubpixelBlock,hybrid_forward,#SubpixelBlock#Any#Any#,37
Before Change
def hybrid_forward(self, F, x,*args, **kwargs):
x = self.conv(x)
x = x.transpose([0, 2, 3, 1])
batchsize,height,width,depth = x.shape
x = x.reshape((batchsize, height , width, 2, 2, int(depth / 4)))
x = x.transpose([0, 1,3,2,4,5])
x = x.reshape((batchsize, height * 2, width * 2, int(depth / 4)))
x = x.transpose([0, 3, 1, 2])
x = self.relu(x)
return x
class SRGenerator(gluon.nn.HybridBlock):
After Change
def hybrid_forward(self, F, x, *args, **kwargs):
x = self.conv(x)
x = x.reshape((0, -4, -1, 4, 0, 0)) // bs, c // 4, h, w
x = x.reshape((0, 0, -4, 2, 2, 0, 0)) // bs, c // 4, 2, 2, h, w
x = x.transpose((0, 1, 2, 4, 3, 5)) // bs, c // 4, 2, h, 2, w
x = x.reshape((0, 0, -3, -3)) // bs, c // 4, h * 2, w * 2
x = self.relu(x)
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: dmlc/gluon-cv
Commit Name: 47c6377324b4906ed5e133011350c22d1f809466
Time: 2020-05-01
Author: cheungchih@gmail.com
File Name: scripts/gan/srgan/train_srgan.py
Class Name: SubpixelBlock
Method Name: hybrid_forward
Project Name: sentinel-hub/eo-learn
Commit Name: cc28a483cf95697bc4ab82030771da69c3cda5d0
Time: 2019-10-02
Author: benosircelj@gmail.com
File Name: features/eolearn/tests/test_doubly_logistic_approximation.py
Class Name: TestDoublyLogisticApproximation
Method Name: setUpClass
Project Name: HyperGAN/HyperGAN
Commit Name: 1aa6f71331656a09a2cc5a6f85a584ee362cedae
Time: 2016-11-26
Author: martyn@255bits.com
File Name: lib/discriminators/pyramid_discriminator.py
Class Name:
Method Name: discriminator