def create_dataset(images, labels):
    images = np.reshape(images, ((- 1), (48 * 48)))
    logger.debug('images-shape: {}, length-labels: {}'.format(images.shape, len(labels)))
    (train, test) = train_test_splitter(images, labels)
    train_dict = {'data': train[0], 'labels': train[1]}
    test_dict = {'data': test[0], 'labels': test[1]}
    with open(os.path.join(DATASET_SAVE_PATH, 'train_batch_0'), 'wb') as file:
        pickle.dump(train_dict, file)
        logger.info('dataset: trainset-dict pickled and saved at {}'.format(DATASET_SAVE_PATH))
    with open(os.path.join(DATASET_SAVE_PATH, 'test_batch_0'), 'wb') as file:
        pickle.dump(test_dict, file)
        logger.info('dataset: testset-dict pickled and saved at {}'.format(DATASET_SAVE_PATH))
    logger.info('dataset created :)')
def create_dataset(images, labels):
    images = np.reshape(images, ((- 1), (48 * 48)))
    logger.debug('images-shape: {}, length-labels: {}'.format(images.shape, len(labels)))
    (train, test) = train_test_splitter(images, labels)
    train_dict = {'data': train[0], 'labels': train[1]}
    test_dict = {'data': test[0], 'labels': test[1]}
    with open(os.path.join(DATASET_SAVE_PATH, 'train_batch_0'), 'wb') as file:
        pickle.dump(train_dict, file)
        logger.info('dataset: trainset-dict pickled and saved at {}'.format(DATASET_SAVE_PATH))
    with open(os.path.join(DATASET_SAVE_PATH, 'test_batch_0'), 'wb') as file:
        pickle.dump(test_dict, file)
        logger.info('dataset: testset-dict pickled and saved at {}'.format(DATASET_SAVE_PATH))
    logger.info('dataset created :)')