69e3319c4bffaa78823be2267f036d3d3fdf286e,tensorlayer/layers/activation.py,PTRelu6,forward,#PTRelu6#Any#,237

Before Change


        // self.add_weights([self.alpha_low, self.alpha_high])

    def forward(self, inputs):
        outputs = self._apply_activation(
            inputs, **{
                "alpha_low": self.alpha_low_constrained,
                "alpha_high": self.alpha_high_constrained,
                "name": "ptrelu6_activation"
            }
        )
        return outputs

After Change


        self.alpha_high_constrained = tf.nn.sigmoid(self.alpha_high, name="constraining_alpha_high_in_0_1")

    def forward(self, inputs):
        pos = tf.nn.relu(inputs)
        pos_6 = -tf.nn.relu(inputs - 6) + self.alpha_high_constrained * tf.nn.relu(inputs - 6)
        neg = -self.alpha_low_constrained * tf.nn.relu(-inputs)

        return pos + pos_6 + neg
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 69e3319c4bffaa78823be2267f036d3d3fdf286e
Time: 2019-03-19
Author: jingqing.zhang15@imperial.ac.uk
File Name: tensorlayer/layers/activation.py
Class Name: PTRelu6
Method Name: forward


Project Name: tensorlayer/tensorlayer
Commit Name: 69e3319c4bffaa78823be2267f036d3d3fdf286e
Time: 2019-03-19
Author: jingqing.zhang15@imperial.ac.uk
File Name: tensorlayer/layers/activation.py
Class Name: PRelu6
Method Name: forward


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: CNNNet
Method Name: user_representation