Skip to content
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

Return and arguments type information for layers. #19836

Open
ghsanti opened this issue Jun 11, 2024 · 2 comments
Open

Return and arguments type information for layers. #19836

ghsanti opened this issue Jun 11, 2024 · 2 comments
Assignees
Labels

Comments

@ghsanti
Copy link
Contributor

ghsanti commented Jun 11, 2024

Calling any of the layers, for example:

    z_in = Input(shape=(123,), name="name")
  • The return type for z_in is Unknown.

Can return types and argument types be added to the layers?

@fchollet
Copy link
Member

In the example above, z_in has a dtype attribute which in this case has value "float32".

@ghsanti
Copy link
Contributor Author

ghsanti commented Jun 11, 2024

But I mean type information for type hints, currently z_in is marked as Unknown. This is from the blueprint of Input, for example:

(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: -> (Unknown | Any | list[Unknown])

@fchollet

@ghsanti ghsanti changed the title Is it possible to get type information from the keras layers calls ? request: type information for layers Jun 17, 2024
@ghsanti ghsanti changed the title request: type information for layers Return and arguments type information for layers. Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants