Skip to content

Commit c839df2

Browse files
Update keras/src/layers/layer.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 886bfbe commit c839df2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

keras/src/layers/layer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,11 +1379,10 @@ def save_own_variables(self, store):
13791379
store[f"{i}"] = v
13801380

13811381
def _get_quantized_variables(self):
1382-
quantized_vars = []
1383-
for v in self._trainable_variables + self._non_trainable_variables:
1384-
if not backend.is_float_dtype(v.dtype):
1385-
quantized_vars.append(v)
1386-
return quantized_vars
1382+
quantized_vars = [
1383+
v for v in self._trainable_variables + self._non_trainable_variables
1384+
if not backend.is_float_dtype(v.dtype)
1385+
]
13871386

13881387
def load_own_variables(self, store):
13891388
"""Loads the state of the layer.

0 commit comments

Comments
 (0)