October 2017
Intermediate to advanced
330 pages
7h 7m
English
import pandas as pdimport numpy as npimport matplotlib.pyplot as pltfrom sklearn.model_selection import train_test_splitimport tensorflow as tfSEED = 2017
DIR = 'Data/faces/'training_file = pd.read_csv(DIR + 'training.csv')cols = training_file.columns[:-1]training_file['Image'] = training_file['Image'].apply(lambda Image: np.fromstring(Image, sep=' '))training_file = training_file.dropna()
img_cols = 96img_rows = 96img_channels = 1n_labels = 30 # 15 times x, y pairsX = np.vstack(training_file['Image'])X = X.reshape(-1, img_cols, ...
Read now
Unlock full access