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

Add a docstring for compile #838

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

mattdangerw
Copy link
Member

Just noticed we are missing a compile docstring. Probably good to add.

Adapter from tf.keras with a few changes.

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Will apply nits after merging.

jit_compile: Bool or `"auto"`. Whether to use XLA compilation when
compiling a model. This value should currently never be `True`
on the torch backed, and should always be `True` or `"auto"` on
the jax backend. On tensorflow, this value can be `True` or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not entirely accurate. You can pass jit_compile=False with JAX, which means that the model will train/evaluate/predict in eager execution (so jit_compile is equivalent to not run_eagerly). TF is special in the sense that it supports the unique combination jit_compile == False and run_eagerly == False, which means "classic graph mode".

@fchollet fchollet merged commit 534a3cd into keras-team:main Sep 5, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants