9e6be3f28d5b213e8596b8f79e68efd6d5fd21ba,deepctr/layers/normalization.py,LayerNormalization,call,#LayerNormalization#Any#,27

Before Change


    def call(self, x):
        mean = K.mean(x, axis=self.axis, keepdims=True)
        std = K.std(x, axis=self.axis, keepdims=True)
        return self.gamma * (x - mean) / (std + self.eps) + self.beta

    def compute_output_shape(self, input_shape):
        return input_shape

After Change



    def call(self, inputs):
        mean = K.mean(inputs, axis=self.axis, keepdims=True)
        variance = K.mean(K.square(inputs - mean), axis=-1, keepdims=True)
        std = K.sqrt(variance + self.eps)
        outputs = (inputs - mean) / std
        if self.scale:
            outputs *= self.gamma
        if self.center:
            outputs += self.beta
        return outputs

    def compute_output_shape(self, input_shape):
        return input_shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: shenweichen/DeepCTR
Commit Name: 9e6be3f28d5b213e8596b8f79e68efd6d5fd21ba
Time: 2020-05-17
Author: last.fantasy@qq.com
File Name: deepctr/layers/normalization.py
Class Name: LayerNormalization
Method Name: call


Project Name: dmlc/gluon-cv
Commit Name: cf767a1297d67caf41577508aacc7cbc24ae8f14
Time: 2020-09-16
Author: 43100519+xdeng7@users.noreply.github.com
File Name: scripts/gan/stylegan/modules.py
Class Name: EqualLinear
Method Name: hybrid_forward


Project Name: dmlc/gluon-cv
Commit Name: cf767a1297d67caf41577508aacc7cbc24ae8f14
Time: 2020-09-16
Author: 43100519+xdeng7@users.noreply.github.com
File Name: scripts/gan/stylegan/modules.py
Class Name: EqualConv2d
Method Name: hybrid_forward