Hello World!
In this post, I am going to explain about how to train logistic/softmax regression model using TensorFlow, to predict if the input is a neutral face or smiling face. About the dataset, I collected images from Google Images and cropped the mouth part is manually put them into two separate folders. This is developed in Python 2.7.10 and Tensorflow 1.2.1.
Idea here's to flat the images into 1-Dimension, and train it via logistic regression.
STEPS:
- Loading data and resize
- Check dimension of our data
- Splitting the data using sklearn
X_train, X_test, y_train, y_test = train_test_split( X, Y, test_size=0.33, random_state=42) - Flatting the data into 1 dimension
While we implement Softmax regression, it needs 1 dimension array as an Input, It's important to convert our 2-D array to 1-D array
- Building the softmax regression using TensorFlow
All the above steps have been well explained in the video below:
If you like the video please give a thumbs up and subscribe to the channel: https://www.youtube.com/channel/UC97_pHqfRIp6h-E30jj5JRw