In [17]:
# Now we pass our predictions data through a non-linear function (sigmoid) and assign it to a variable called values.
values = tf.sigmoid(predictions)

# compare the results, if the actual values are equal to the predicted values
correct_prediction = tf.equal(target,(tf.to_float(tf.greater(values, 0.5)))) 

# Convert our datatype from boolean into float, and calculate the accuracy of our set of data
accuracy = tf.reduce_mean(tf.cast(correct_prediction, 'float'))