Closed
Description
The description is self-explanatory, when using hasattr() on the input attribute of a keras layer it raises an error when the layer has not been called yet.
if hasattr(first_layer, 'input'):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: The layer resizing has never been called and thus has no defined input.
This happens because "input" and "output" raise a ValueError, instead of a AttributeError as it should be.
Metadata
Metadata
Assignees
Labels
No labels