TensorFlow 中生成Batch数据
Reference: https://www.tensorflow.org/programmers_guide/datasets#simple_batching
1. 利用sklearn
def batch(self,STEPS=10000, BATCH=100):
ss = ShuffleSplit(n_splits=STEPS, train_size=BATCH)
ss.get_n_splits(self.features, self.labels)
for step, (idx, _) in enumerate(ss.split(self.features, self.labels), start=1):
yield self.fea