def build_fake_data(num_examples=<NUM_LIT:10>):
class Dummy(object):<EOL><INDENT>pass<EOL><DEDENT>num_examples = <NUM_LIT:10><EOL>mnist_data = Dummy()<EOL>mnist_data.train = Dummy()<EOL>mnist_data.train.images = np.float32(np.random.randn(<EOL>num_examples, *IMAGE_SHAPE))<EOL>mnist_data.train.labels = np.int32(np.random.permutation(<EOL>np.arange(num_examples)))<EOL>mnist_data.train.num_examples = num_examples<EOL>mnist_data.validation = Dummy()<EOL>mnist_data.validation.images = np.float32(np.random.randn(<EOL>num_examples, *IMAGE_SHAPE))<EOL>mnist_data.validation.labels = np.int32(np.random.permutation(<EOL>np.arange(num_examples)))<EOL>mnist_data.validation.num_examples = num_examples<EOL>return mnist_data<EOL>
Build fake MNIST-style data for unit testing.