We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dec184 commit 18dbeedCopy full SHA for 18dbeed
tf_keras/engine/base_layer_v1.py
@@ -2186,8 +2186,8 @@ def _maybe_build(self, inputs):
2186
else:
2187
self._set_dtype_policy(policy.Policy(dtype))
2188
input_shapes = None
2189
- if all(hasattr(x, "shape") for x in input_list):
2190
- input_shapes = tf.nest.map_structure(lambda x: x.shape, inputs)
+ if any(hasattr(x, "shape") for x in input_list):
+ input_shapes = tf_utils.get_shapes(inputs)
2191
# Only call `build` if the user has manually overridden the build
2192
# method.
2193
if not hasattr(self.build, "_is_default"):
0 commit comments