37fd456a5cd44db6ca23975de6fe151c9713c58f,keras/layers/core.py,Lambda,get_output,#Lambda#Any#,1546

Before Change


    def get_output(self, train=False):
        X = self.get_input(train)
        func = marshal.loads(self.function)
        func = types.FunctionType(func, globals())
        return func(X)


class MaskedLambda(MaskedLayer, Lambda):

After Change


        X = self.get_input(train)
        arguments = self.arguments
        arg_spec = inspect.getargspec(self.function)
        if "train" in arg_spec.args:
            arguments["train"] = train
        return self.function(X, **arguments)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 37fd456a5cd44db6ca23975de6fe151c9713c58f
Time: 2016-03-11
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: Lambda
Method Name: get_output


Project Name: keras-team/keras
Commit Name: 37fd456a5cd44db6ca23975de6fe151c9713c58f
Time: 2016-03-11
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: LambdaMerge
Method Name: output_shape


Project Name: keras-team/keras
Commit Name: 37fd456a5cd44db6ca23975de6fe151c9713c58f
Time: 2016-03-11
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: LambdaMerge
Method Name: get_output


Project Name: keras-team/keras
Commit Name: 37fd456a5cd44db6ca23975de6fe151c9713c58f
Time: 2016-03-11
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: Lambda
Method Name: output_shape