368df8ef04dfc289e3c6d5a177336f97bb233ae7,keras/regularizers.py,ActivityRegularizer,__call__,#ActivityRegularizer#Any#,46

Before Change



    def __call__(self, loss):
        loss += self.l1 * T.sum(T.mean(abs(self.layer.get_output(True)), axis=0))
        loss += self.l2 * T.sum(T.mean(self.layer.get_output(True) ** 2, axis=0))
        return loss

    def get_config(self):

After Change


        self.layer = layer

    def __call__(self, loss):
        output = self.layer.get_output(True)
        loss += self.l1 * K.sum(K.mean(K.abs(output), axis=0))
        loss += self.l2 * K.sum(K.mean(output ** 2, axis=0))
        return loss
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 368df8ef04dfc289e3c6d5a177336f97bb233ae7
Time: 2015-11-15
Author: francois.chollet@gmail.com
File Name: keras/regularizers.py
Class Name: ActivityRegularizer
Method Name: __call__


Project Name: keras-team/keras
Commit Name: e8e8f7625be33b009e81ec6457526382ef00d929
Time: 2015-12-10
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: Layer
Method Name: get_input


Project Name: keras-team/keras
Commit Name: 16d0e405608e02d3864a13d4bc4a6b0cb2e3361a
Time: 2015-08-31
Author: joao.eel@gmail.com
File Name: keras/layers/core.py
Class Name: Merge
Method Name: get_output


Project Name: keras-team/keras
Commit Name: dd6697738b28e6b46d1df81ef548b02fb4b1b728
Time: 2015-09-24
Author: eder@macbook.com
File Name: keras/layers/core.py
Class Name: Merge
Method Name: get_output


Project Name: keras-team/keras
Commit Name: 8bfafd6d7f814bcd0e77f6f34c17c2c9a003a02b
Time: 2015-09-22
Author: eder@macbook.com
File Name: keras/layers/core.py
Class Name: Merge
Method Name: get_output