-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Fix int
given for float
args
#14900
Merged
copybara-service
merged 4 commits into
keras-team:master
from
SamuelMarks:float-default-for-float-arg-not-int
Jul 12, 2021
Merged
Fix int
given for float
args
#14900
copybara-service
merged 4 commits into
keras-team:master
from
SamuelMarks:float-default-for-float-arg-not-int
Jul 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cision/policy_test,premade/linear_test,premade/wide_deep_test}.py] Fix `int` given for `float` args
… given for `float` args
fchollet
requested changes
Jul 11, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
…yers/advanced_activations}.py] .0 => 0.
fchollet
approved these changes
Jul 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
fchollet
added
kokoro:force-run
ready to pull
Ready to be merged into the codebase
labels
Jul 12, 2021
copybara-service bot
pushed a commit
to tensorflow/tensorflow
that referenced
this pull request
Jul 12, 2021
Imported from GitHub PR keras-team/keras#14900 This is the sister commit to #49974 > I'm writing a parser/emitter that goes from Python to Python (and also OpenAPI). I found some type inconsistencies, when I would run `type(func_argument)` it would not match the argument type referenced in the docstring. This PR solves one such problem. PS: Previously when I've tried to commit here I've come across issues, so though it'd be good to start small with a proof-of-concept before going full-throttle. So before I go through the effort of manually making these changes… or extending my [`ast`](https://docs.python.org/3/library/ast.html) parser/emitter to automatically make numeric types consistent (between docstring and default/provided argument), I wanted to gain your feedback. Thanks. EDIT: Ended up going through the codebase and [probably] fixing all the obvious cases Copybara import of the project: -- 5a61ffc52b231325eda91d2f01c7df2a99d91222 by Samuel Marks <[email protected]>: [{activations,backend,backend_test}.py] Fix `int` given for `float` args -- 6325142d655bac2724187fa426cb8728563c92f1 by Samuel Marks <[email protected]>: [keras/{backend,losses,distribute/keras_premade_models_test,mixed_precision/policy_test,premade/linear_test,premade/wide_deep_test}.py] Fix `int` given for `float` args -- a1cc01da4392729bf379904ffdf6bb1706076867 by Samuel Marks <[email protected]>: [keras/{engine/training_v1,layers/advanced_activations}.py] Fix `int` given for `float` args -- 24cc55d4245b93ecc9685ee389243ca7002bd196 by Samuel Marks <[email protected]>: [keras/{activations,backend,backend_test,losses,engine/training_v1,layers/advanced_activations}.py] .0 => 0. PiperOrigin-RevId: 384311619 Change-Id: I4ac0c2832b21252eeb440bf1b137ca6991ffe1bf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the sister commit to tensorflow/tensorflow#49974
PS: Previously when I've tried to commit here I've come across issues, so though it'd be good to start small with a proof-of-concept before going full-throttle. So before I go through the effort of manually making these changes… or extending my
ast
parser/emitter to automatically make numeric types consistent (between docstring and default/provided argument), I wanted to gain your feedback. Thanks.EDIT: Ended up going through the codebase and [probably] fixing all the obvious cases