We proceed with the recipe as follows:
- We start by loading the libraries and initializing our computational graph as follows:
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import requests sess = tf.Session()
- Next, we load, extract, and normalize our data as in the preceding recipe, except that here we are going to using the low birth weight indicator variable as our target instead of the actual birth weight, shown as follows:
# Name of data filebirth_weight_file = 'birth_weight.csv'birthdata_url = 'https://github.com/nfmcclure/tensorflow_cookbook/raw/master' \ '/01_Introduction/07_Working_with_Data_Sources/birthweight_data/birthweight.dat'# Download data and create data file if file does not ...