text_plain_output_1.png
import numpy as np

images = np.load('../input/olivetti_faces.npy')
images.shape

targets = np.load('../input/olivetti_faces_target.npy')
targets.shape

data = images.reshape(images.shape[0], images.shape[1] * images.shape[2])
data.shape

train = data[targets < 30]
train.shape

n_pixels = data.shape[1]
n_pixels

y_train = train[:, n_pixels // 2:]
y_train