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

Incomplete description of LSTM.__call__() params #31237

Closed
habernal opened this issue Aug 1, 2019 · 3 comments
Closed

Incomplete description of LSTM.__call__() params #31237

habernal opened this issue Aug 1, 2019 · 3 comments
Assignees
Labels
comp:keras Keras related issues type:docs-bug Document issues

Comments

@habernal
Copy link
Contributor

habernal commented Aug 1, 2019

URL(s) with the issue:

Description of issue (what needs changing):

The current documentation reads:

  Call arguments:
    inputs: A 3D tensor.
    mask: Binary tensor of shape `(samples, timesteps)` indicating whether
      a given timestep should be masked.
    training: Python boolean indicating whether the layer should behave in
      training mode or in inference mode. This argument is passed to the cell
      when calling it. This is only relevant if `dropout` or
      `recurrent_dropout` is used.
    initial_state: List of initial state tensors to be passed to the first
      call of the cell.

It would be worth mentioning that

  • mask, training, and initial_state are optional
  • if initial_state is not provided, default zeros are imputed (by calling cell.get_initial_state() or cell.zero_state()), see tensorflow_core/python/ops/rnn.py lines 677 or 1382.

Due to iheritance of RNN layers (incl. mixins) and missing documentation at some places (haven't found any comments on get_initial_state), it's quite hard to figure it out.

Submit a pull request?

I'd like to keep it to someone who really knows the Keras internals; to me it's still a bit cryptic (i.e., where exactly get_initial_state_fn comes from, etc.)

@habernal habernal added the type:docs-bug Document issues label Aug 1, 2019
@gadagashwini-zz gadagashwini-zz self-assigned this Aug 2, 2019
@gadagashwini-zz gadagashwini-zz added the comp:keras Keras related issues label Aug 2, 2019
@ymodak ymodak assigned lamberta and unassigned ymodak Aug 7, 2019
@lamberta
Copy link
Member

lamberta commented Aug 7, 2019

Thanks. That file is here, can you send a pull request?

@habernal
Copy link
Contributor Author

habernal commented Aug 8, 2019

@lamberta I'm not sure what you mean

@habernal
Copy link
Contributor Author

Fixed in this PR: #31646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:keras Keras related issues type:docs-bug Document issues
Projects
None yet
Development

No branches or pull requests

4 participants