nfmcclure / tensorflow_cookbook

Code for Tensorflow Machine Learning Cookbook
https://www.packtpub.com/big-data-and-business-intelligence/tensorflow-machine-learning-cookbook-second-edition
MIT License
6.24k stars 2.41k forks source link

Wrong code in Chapter2-04 #109

Closed Jinkeycode closed 6 years ago

Jinkeycode commented 6 years ago

tensorflow_cookbook/02_TensorFlow_Way/04_Implementing_Loss_Functions/04_loss_functions.py tensorflow_cookbook/02_TensorFlow_Way/04_Implementing_Loss_Functions/04_loss_functions.ipynb

Sigmoid Entropy Loss function is

 tf.nn.sigmoid_cross_entropy_with_logits(logits=x_val_input, labels=target_input)

but in your code is

xentropy_sigmoid_y_vals = tf.nn.softmax_cross_entropy_with_logits(logits=x_val_input, labels=target_input)

line 71 on .py file and the same place on .ipynb

nfmcclure commented 6 years ago

Hi @Jinkeycode , wow, that's quite a typo, sorry about that and the late reply. I'm just triaging everything now and getting ready to go through and update all the code for a book v2.

I'll update this very soon and you should see a fix in the next few weeks. Thanks again!

nfmcclure commented 6 years ago

This should be fixed now. Thanks for the notice!