fc148e1a29e3d7893c438f701b8422225c95fc66,examples/classification.py,MNISTGenerator,create,#MNISTGenerator#,66

Before Change



class MNISTGenerator(BaseGenerator):
    def create(self):
        gan = self.gan
        config = self.config
        ops = self.ops
        end_features = config.end_features or 10

        ops.describe("custom_generator")

        net = gan.inputs.x
        net = ops.reshape(net, [gan.batch_size(), -1])
        net = ops.linear(net, end_features)
        net = ops.lookup("tanh")(net)
        self.fy = net
        self.sample = net
        return net
    def layer(self, name):
        return getattr(self, name)

class MNISTDiscriminator(BaseDiscriminator):

After Change



class MNISTGenerator(BaseGenerator):
    def create(self):
        self.linear = torch.nn.Linear(28*28*1, 1024)
        self.relu = torch.nn.ReLU()
        self.linear2 = torch.nn.Linear(1024, 10)
        self.sigmoid = torch.nn.Sigmoid()
    def forward(self, input, context={}):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: fc148e1a29e3d7893c438f701b8422225c95fc66
Time: 2020-07-10
Author: mikkel@255bits.com
File Name: examples/classification.py
Class Name: MNISTGenerator
Method Name: create


Project Name: chainer/chainerrl
Commit Name: f28824f960f92b8325ab7b99af46a09fb59bb1ba
Time: 2017-01-22
Author: muupan@gmail.com
File Name: examples/ale/train_dqn_ale.py
Class Name:
Method Name: parse_arch


Project Name: chainer/chainerrl
Commit Name: 1dddcc34335f9fef682a8c3b818639b2726a82d7
Time: 2017-01-22
Author: muupan@gmail.com
File Name: examples/ale/train_dqn_ale.py
Class Name:
Method Name: parse_arch