Skip to content

Fix categorical_crossentropy docstring#41199

Merged
tensorflow-copybara merged 1 commit intotensorflow:masterfrom
ZhuBaohe:cross
Jul 9, 2020
Merged

Fix categorical_crossentropy docstring#41199
tensorflow-copybara merged 1 commit intotensorflow:masterfrom
ZhuBaohe:cross

Conversation

@ZhuBaohe
Copy link
Copy Markdown
Contributor

@ZhuBaohe ZhuBaohe commented Jul 8, 2020

This PR fixes the docstring of tf.keras.backend.categorical_crossentropy method.

@google-ml-butler google-ml-butler bot added the size:XS CL Change Size: Extra Small label Jul 8, 2020
@gbaned gbaned self-assigned this Jul 8, 2020
@gbaned gbaned requested a review from qlzh727 July 8, 2020 14:16
@gbaned gbaned added the comp:keras Keras related issues label Jul 8, 2020
Copy link
Copy Markdown
Contributor

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Why the change? What is wrong with the existing values?

@ZhuBaohe
Copy link
Copy Markdown
Contributor Author

ZhuBaohe commented Jul 9, 2020

@mihaimaruseac

Since from_logits=False, the tensor b expects to the result of a softmax.

This modification ensures that tf.reduce_sum(b, axis=1) generates array([1., 1., 1.].

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jul 9, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 9, 2020
@tensorflow-copybara tensorflow-copybara merged commit 3f26ed8 into tensorflow:master Jul 9, 2020
@ZhuBaohe ZhuBaohe deleted the cross branch July 9, 2020 21:33
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.

6 participants