What's the simplest way I can use flow_from_directory in Keras while limiting the number of examples used in each subdirectory by some number N?
For context, I'd like to be able to use a small subset of the total images for testing purposes without having to create a separate top level directory for the smaller dataset, since I'm pulling this data from AWS S3 buckets during training.