b499c2fd5b0907290d0778ec8c76144134f3d776,hypergan/configurable_component.py,ConfigurableComponent,activation_to_module,#ConfigurableComponent#Any#,188

Before Change


        if name == "relu":
            return nn.ReLU()
        if name == "tanh":
            return nn.Tanh()

    def count_number_trainable_params(self):
        """
        Counts the number of trainable variables.

After Change


        self.named_layers[name]     = net

    def activation_to_module(self, name):
        return {
            "celu": nn.CELU,
            "gelu": nn.GELU,
            "lrelu": nn.LeakyReLU,
            "prelu": nn.PReLU,
            "relu": nn.ReLU,
            "relu6": nn.ReLU6,
            "selu": nn.SELU,
            "sigmoid": nn.Sigmoid,
            "softplus": nn.Softplus,
            "softshrink": nn.Softshrink,
            "softsign": nn.Softsign,
            "tanh": nn.Tanh,
            "tanhshrink": nn.Tanhshrink
        }[name]()

    def count_number_trainable_params(self):
        """
        Counts the number of trainable variables.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 7

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: b499c2fd5b0907290d0778ec8c76144134f3d776
Time: 2020-02-08
Author: martyn@255bits.com
File Name: hypergan/configurable_component.py
Class Name: ConfigurableComponent
Method Name: activation_to_module


Project Name: osmr/imgclsmob
Commit Name: 56a046e34a726fcae1fb47c8a973a99b40423205
Time: 2019-03-29
Author: osemery@gmail.com
File Name: chainer_/seg_utils.py
Class Name:
Method Name: get_metainfo


Project Name: osmr/imgclsmob
Commit Name: 59086d7bdfb4ae8dba7577983215044332ad3252
Time: 2019-03-28
Author: osemery@gmail.com
File Name: pytorch/seg_utils.py
Class Name:
Method Name: get_metainfo


Project Name: tensorflow/tensorboard
Commit Name: 6a8fbb8349a8f2055436d2d8a3590ef6fbf5607e
Time: 2018-03-30
Author: 4221553+chihuahua@users.noreply.github.com
File Name: tensorboard/plugins/beholder/im_util.py
Class Name:
Method Name: apply_colormap


Project Name: osmr/imgclsmob
Commit Name: e583ae1925021107a0672e5cd4f586aef3e50452
Time: 2019-03-27
Author: osemery@gmail.com
File Name: gluon/seg_utils.py
Class Name:
Method Name: get_metainfo