Implementing logistic regression using TensorFlow