36ac91f0576b2295df1f3f8b23c305d69698a0ff,keras/models.py,Sequential,get_weights,#Sequential#,501

Before Change


        as a flat list of Numpy arrays.
        
        // support for legacy behavior
        weights = []
        for layer in self.flattened_layers:
            weights += layer.get_weights()
        return weights

    def set_weights(self, weights):
        Sets the weights of the model.
        The `weights` argument should be a list

After Change


        
        if self.model is None:
            self.build()
        return self.model.get_weights()

    def set_weights(self, weights):
        Sets the weights of the model.
        The `weights` argument should be a list
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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: get_weights


Project Name: keras-team/autokeras
Commit Name: 1d52eb75c5fcfb3f9465eb6614b7bb2b57dece4d
Time: 2018-05-20
Author: jin@tamu.edu
File Name: autokeras/layer_transformer.py
Class Name:
Method Name: deeper_conv_block