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