894a2b921ea0ba9969cec62b484d03ab706ad25a,hypergan/configurable_component.py,ConfigurableComponent,layer_linear,#ConfigurableComponent#Any#Any#Any#,364

Before Change


    def layer_linear(self, net, args, options):

        if "*" in str(args[0]):
            reshape = [int(x) for x in args[0].split("*")]
            size = reduce(operator.mul, reshape)
        else:
            size = int(args[0])
            reshape = None
        net = self.ops.reshape(net, [self.ops.shape(net)[0], -1])

        options["reshape"] = reshape
        net = self.do_ops_layer(self.ops.linear, net, size, options)

        return net

After Change



    def layer_linear(self, net, args, options):

        self.nn_layers.append(nn.Flatten())//TODO only if necessary
        self.nn_layers.append(nn.Linear(self.current_input_size, int(args[0])))

    def layer_reshape(self, net, args, options):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: 894a2b921ea0ba9969cec62b484d03ab706ad25a
Time: 2020-02-07
Author: martyn@255bits.com
File Name: hypergan/configurable_component.py
Class Name: ConfigurableComponent
Method Name: layer_linear


Project Name: albermax/innvestigate
Commit Name: b106ef05680def54ba3ea46d45f49d649ee21205
Time: 2017-12-18
Author: alber.maximilian@gmail.com
File Name: innvestigate/utils/tests/networks/base.py
Class Name:
Method Name: cnn_2convb_2dense


Project Name: albermax/innvestigate
Commit Name: b106ef05680def54ba3ea46d45f49d649ee21205
Time: 2017-12-18
Author: alber.maximilian@gmail.com
File Name: innvestigate/utils/tests/networks/base.py
Class Name:
Method Name: mlp_2dense