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

A minor mistake in cross entropy loss #357

Merged
merged 1 commit into from
Apr 12, 2020

Conversation

kilarinikhil
Copy link
Contributor

tf.reduce_mean(-tf.reduce_sum(y_true * tf.math.log(y_pred),1)) or else it simply finds the sum and the reduced mean remains the sum itself.

tf.reduce_mean(-tf.reduce_sum(y_true * tf.math.log(y_pred),1)) or else it simply finds the sum and the reduced mean remains the sum itself.
Copy link
Owner

@aymericdamien aymericdamien left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

@aymericdamien aymericdamien merged commit c577281 into aymericdamien:master Apr 12, 2020
flyworker pushed a commit to nebulaai/TensorFlow-Examples that referenced this pull request Nov 17, 2020
* Update dcgan.py (aymericdamien#320)

correct some misunderstanding comments

* add new examples

* update docs

* small fixes

* fix docs

* add word2vec for TF2.0

* Update tensorflow v2 installation

* A minor mistake in cross entropy loss (aymericdamien#357)

tf.reduce_mean(-tf.reduce_sum(y_true * tf.math.log(y_pred),1)) or else it simply finds the sum and the reduced mean remains the sum itself.

* Update convolutional_network_raw.ipynb (aymericdamien#366)

* Update neural_network.ipynb (aymericdamien#361)

Add the missing fully connected layer 2 in the RNN example

* output layer aactivation, add fc2 in call (aymericdamien#358)

softmax applied during training phase to output layer and fc2 layer is unused

Co-authored-by: Aymeric Damien <aymeric.damien@gmail.com>

* make TensorFlow 2 examples compatible with Python 3 (aymericdamien#339)

* update docs (aymericdamien#367)

* Modify tf2 linear regression loss function (aymericdamien#371)

* Modify linear regression loss function (aymericdamien#373)

* Modify tf2 linear regression loss function

* neural_network.ipynp syntax error has been corrected

* fix links in README of TensorFlow_v1 (aymericdamien#374)

* Update README.md

* Update README.md

* Update README.md

* Fix links

* Update README.md

* add GBDT example (aymericdamien#379)

* Add tensorboard example (aymericdamien#381)

* add tensorboard example

* fix desc

* add tensorboard run cmd

* fix ml intro

* fix ml intro

* Fix ML intro notebook (aymericdamien#382)

* fix ml intro

* fix ml intro

* Update bidirectional_rnn.ipynb (aymericdamien#380)

Replace broken link for Sepp Hochreiter & Jurgen Schmidhuber's LSTM document.

* MultiGPU Training Example (aymericdamien#387)

* fix ml intro

* fix ml intro

* add multi gpu example

* add multi gpu example

* fix multigpu typo

Co-authored-by: 陈敏华 <chenmh@shanghaitech.edu.cn>
Co-authored-by: aymericdamien <aymeric.damien@gmail.com>
Co-authored-by: Nikhil Kilari <36819773+kilarinikhil@users.noreply.github.com>
Co-authored-by: lkdmttg7 <inprovertmer07@gmail.com>
Co-authored-by: Dragon-Yu <769888056@qq.com>
Co-authored-by: Sebastian Stein <seb.kde@hpfsc.de>
Co-authored-by: Hossein Sheikhi Darani <64957461+HosseinSheikhi@users.noreply.github.com>
Co-authored-by: Qingxu Zhu <49614979+ZQX323@users.noreply.github.com>
Co-authored-by: LCB0B <slavonie@gmail.com>
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.

None yet

2 participants