Created by: wojtuss
This PR is the analog of the https://github.com/PaddlePaddle/Paddle/pull/11640 PR for paddle v2.
When testing PaddlePaddle performance on ResNet-50 model with the cifar or flowers dataset and with a large number of iterations and batch sizes, the amount of data returned by the dataset reader is not sufficient.
This patch adds the option of cycling through the two datasets.