Skip to content

Commit b59b20f

Browse files
Merge pull request #937 from idiomaticrefactoring:patch-1
PiperOrigin-RevId: 437648571
2 parents 60b3587 + 417b4b3 commit b59b20f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tensorflow_model_optimization/python/core/quantization/keras/experimental/default_n_bit/default_n_bit_quantize_registry.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,7 @@ def get_activations_and_quantizers(self, layer):
451451
return activations_quantizers
452452

453453
def _flatten(self, list_of_lists):
454-
flat_list = []
455-
for sublist in list_of_lists:
456-
for item in sublist:
457-
flat_list.append(item)
454+
flat_list = [item for sublist in list_of_lists for item in sublist]
458455
return flat_list
459456

460457
def set_quantize_weights(self, layer, quantize_weights):

0 commit comments

Comments
 (0)