Skip to content

Commit ad4ef29

Browse files
committed
Revert "Small tidy up: Removed unused leftover variables. The variable layer.trainable_weights has all we need."
This reverts commit 7b7fe53.
1 parent f1beeb7 commit ad4ef29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ def trainable(self, value):
326326

327327
@property
328328
def trainable_weights(self):
329-
return self.layer.trainable_weights
329+
return self.layer.trainable_weights + self._trainable_weights
330330

331331
@property
332332
def non_trainable_weights(self):
333-
return self.layer.non_trainable_weights
333+
return self.layer.non_trainable_weights + self._non_trainable_weights
334334

335335
@property
336336
def updates(self):

0 commit comments

Comments
 (0)