nfmcclure / tensorflow_cookbook

Code for Tensorflow Machine Learning Cookbook

Home Page:https://www.packtpub.com/big-data-and-business-intelligence/tensorflow-machine-learning-cookbook-second-edition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

08_logistic_regression #88 reopen for python 3 coding

davidabek1 opened this issue · comments

03_Linear_Regression\08_Implementing_Logistic_Regression\08_logistic_regression.py
and also in the ipython notebook, same issue.

using csv writer,
python 3 requires adding ",newline='' ",
in order not to get extra empty line within each line write.

line 40: with open(birth_weight_file, "w", newline='') as f:

without this update, you get an error after reading the file and trying to load it into the x_vals variable.

commented

This should be updated now, thanks!