def mnist():
    """Note that this dataset, unlike other Talos datasets,returns:

    x_train, y_train, x_val, y_val"""
    import keras
    import numpy as np
    (x_train, y_train), (x_val, y_val) = keras.datasets.mnist.load_data()
    img_rows, img_cols = 28, 28
    if keras.backend.image_data_format() == 'channels_first':
        x_train = x_train.reshape(x_train.shape[0], 1, img_rows, img_cols)
        x_val = x_val.reshape(x_val.shape[0], 1, img_rows, img_cols)
        input_shape = 1, img_rows, img_cols
    else:
        x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
        x_val = x_val.reshape(x_val.shape[0], img_rows, img_cols, 1)
        input_shape = img_rows, img_cols, 1
    x_train = x_train.astype('float32')
    x_val = x_val.astype('float32')
    x_train /= 255
    x_val /= 255
    classes = len(np.unique(y_train))
    y_train = keras.utils.to_categorical(y_train, classes)
    y_val = keras.utils.to_categorical(y_val, classes)
    print('Use input_shape %s' % str(input_shape))
    return x_train, y_train, x_val, y_val
