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

Added docstring ops/image/resize #509

Merged
merged 5 commits into from
Jul 17, 2023
Merged

Added docstring ops/image/resize #509

merged 5 commits into from
Jul 17, 2023

Conversation

Frightera
Copy link
Contributor

PR adds the docstring for keras_core.ops.image.resize

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 PR!


>>> x = np.random.random((2, 4, 4, 3)) # batch of 2 RGB images
>>> y = keras_core.ops.image.resize(x, (2, 2))
>>> y.shape
Copy link
Member

Choose a reason for hiding this comment

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

Print shape (same below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That depends on the backend, if it is TensorFlow it'll output TensorShape etc. Guess it is best to remove y.shape then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it OK to put symbolic outputs here, like: (2, 2, 2, 3) etc?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it should just be indicative.

keras_core/ops/image.py Outdated Show resolved Hide resolved
keras_core/ops/image.py Outdated Show resolved Hide resolved
keras_core/ops/image.py Outdated Show resolved Hide resolved
keras_core/ops/image.py Outdated Show resolved Hide resolved
@Frightera
Copy link
Contributor Author

Frightera commented Jul 16, 2023

Thank you for your comments @fchollet, should be good to go now 😎

Edit: Can you also check keras-team/keras#18442?

@Frightera
Copy link
Contributor Author

Hi @fchollet, any update on this? Looks like I can't re-run the checks 😢

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.

LGTM, thanks!

@fchollet fchollet merged commit 401ec43 into keras-team:main Jul 17, 2023
adi-kmt pushed a commit to adi-kmt/keras-core that referenced this pull request Jul 21, 2023
* Image resize docstring added

* Unindent examples

* Remove tf tensor reference

* Update the resize docstring

* Add default arg
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