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

fix: Display demo utils gallery with arbitrary number of images #2479

Merged

Conversation

thomas-coldwell
Copy link
Contributor

What does this PR do?

Hi folks - I noticed that in some of the examples if you set the batch size != 9 then calling demo_utils.visualize_data would raise an error as the gallery_show method expected exactly 9 images as input. This PR now allows it to display an arbitrary number of images with a max of 3 columns (can be changed or turned into a parameter maybe?).

Motivation for this is to make it easier when debugging with any of the examples and you just want to consider the results with a batch size of only 1 or 2 images

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you write any new necessary tests?
  • If this adds a new model, can you run a few training steps on TPU in Colab to ensure that no XLA incompatible OP are used?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@divyashreepathihalli divyashreepathihalli added the kokoro:force-run Runs Tests on GPU label Aug 20, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Aug 20, 2024
@divyashreepathihalli divyashreepathihalli added the kokoro:force-run Runs Tests on GPU label Aug 20, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Aug 20, 2024
@divyashreepathihalli divyashreepathihalli merged commit ba2556c into keras-team:master Aug 20, 2024
10 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.

3 participants