August 2018
Intermediate to advanced
438 pages
12h 3m
English
The first step is to load our base features and create our train, validation and test datasets. For this, we will need to load our base features and labels from disk:
features = joblib.load('base_features.pkl')
labels = joblib.load('dataset_labels.pkl')
data = np.array(list(zip(features, labels)))
features.shape, labels.shape ((30500, 64, 64, 3), (30500,))
We will now randomly shuffle our data and create our train, validation, and test datasets:
np.random.shuffle(data) train, validate, test = np.split(data, [int(.6*len(data)),int(.8*len(data))]) train.shape, validate.shape, test.shape ((18300, 2), (6100, 2), (6100, 2))
Finally, we can also check the per class distribution in each of these datasets using ...
Read now
Unlock full access