quantumflow.datasets.
load_stdgraphs
(size: int) → List[networkx.classes.graph.Graph]¶Load standard graph validation sets
For each size (from 6 to 32 graph nodes) the dataset consists of 100 graphs drawn from the Erdős-Rényi ensemble with edge probability 50%.
quantumflow.datasets.
load_mnist
(size: int = None, border: int = 5, blank_corners: bool = False, nums: List[int] = None) → Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]¶Download and rescale the MNIST database of handwritten digits
MNIST is a dataset of 60,000 28x28 grayscale images handwritten digits, along with a test set of 10,000 images. We use Keras to download and access the dataset. The first invocation of this method may take a while as the dataset has to be downloaded and cached.
If size is None, then we return the original MNIST data. For rescaled MNIST, we chop off the border, downsample to the desired size with Lanczos resampling, and then (optionally) zero out the corner pixels.
Returns (x_train, y_train, x_test, y_test)
x_train ndarray of shape (60000, size, size) y_train ndarray of shape (60000,) x_test ndarray of shape (10000, size, size) y_test ndarray of shape (10000,)