ee179f7da155c3cb8129b954db828906886ad4e4,keras/layers/core.py,AutoEncoder,set_weights,#AutoEncoder#Any#,378

Before Change



    def set_weights(self, weights):
        models = self.encoders + self.decoders
        for i in range(len(models)):
            nb_param = len(models[i].params)
            models[i].set_weights(weights[:nb_param])
            weights = weights[nb_param:]

    def get_input(self, train=False):
        if hasattr(self.encoders[0], "previous"):
            return  self.encoders[0].previous.get_output(train=train)
        else:

After Change


    def set_weights(self, weights):
        nb_param = len(self.encoder.params)
        self.encoder.set_weights(weights[:nb_param])
        self.decoder.set_weights(weights[nb_param:])

    def get_input(self, train=False):
        return self.encoder.get_input(train)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: ee179f7da155c3cb8129b954db828906886ad4e4
Time: 2015-06-08
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: AutoEncoder
Method Name: set_weights


Project Name: keras-team/keras
Commit Name: 36ac91f0576b2295df1f3f8b23c305d69698a0ff
Time: 2017-02-15
Author: francois.chollet@gmail.com
File Name: keras/models.py
Class Name: Sequential
Method Name: set_weights


Project Name: mortendahl/tf-encrypted
Commit Name: f54c2b1361fb86f55a36064158c6baa658ffffb9
Time: 2019-06-26
Author: suriyaku@gmail.com
File Name: examples/mnist/run.py
Class Name:
Method Name: