Skip to content

Conversation

@jameshfisher
Copy link
Contributor

I was confused why my images looked wrong (e.g., apply_brightness_shift does nothing?!). I had interpreted scale=True to mean "multiply by 255 to go from [0,1] format to [0,255] format". This is not what it does. I've copied the more precise docs from https://github.com/keras-team/keras-preprocessing/blob/master/keras_preprocessing/image/utils.py#L271-L272

(I've also made the x doc more precise - it does not just accept a Numpy array; e.g. it accepts tensors)

I was confused why my images looked wrong (e.g., `apply_brightness_shift` does nothing?!). I had interpreted `scale=True` to mean "multiply by 255 to go from `[0,1]` format to `[0,255]` format". This is _not_ what it does. I've copied the more precise docs from https://github.com/keras-team/keras-preprocessing/blob/master/keras_preprocessing/image/utils.py#L271-L272

(I've also made the `x` doc more precise - it does not just accept a Numpy array; e.g. it accepts tensors)
@google-ml-butler google-ml-butler bot added the size:XS CL Change Size: Extra Small label Mar 12, 2021
@google-cla google-cla bot added the cla: yes label Mar 12, 2021
@gbaned gbaned self-assigned this Mar 14, 2021
@gbaned gbaned added the comp:keras Keras related issues label Mar 14, 2021
@gbaned gbaned self-requested a review March 14, 2021 18:18
Copy link

@deeb02 deeb02 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the change.

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Mar 18, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Mar 18, 2021
@copybara-service copybara-service bot merged commit fe7c743 into tensorflow:master Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes comp:keras Keras related issues ready to pull PR ready for merge process size:XS CL Change Size: Extra Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants