-
Notifications
You must be signed in to change notification settings - Fork 19.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request: type information for layers #19836
Comments
In the example above, |
But I mean type information for type hints, currently (function) def Input(
shape: Unknown | None = None,
batch_size: Unknown | None = None,
dtype: Unknown | None = None,
sparse: Unknown | None = None,
batch_shape: Unknown | None = None,
name: Unknown | None = None,
tensor: Unknown | None = None,
optional: bool = False
) -> (Unknown | Any | list[Unknown]) This makes it difficult: |
Linked issue was solved using Jedi (or a workaround for Pylance.) But this issue isn't resolved yet i.e how to get typing information on class instances. |
Is this planned? Do you need help with it? @mehtamansi29 I'd find having this types quite useful since I'm new to Keras. |
Executing any of the layers, for example:
The return type is Unknown, which means we don't have hints for the methods of z_in.
Certainly we could do
cast(KerasTensor,z_in)
but that would need to be done with every layer, every time.Any ideas @mehtamansi29 ?
The text was updated successfully, but these errors were encountered: