Is there a way to partition a tf.Dataset with TensorFlow’s Dataset API? (Not a partition of a simple np.array)
问题 I checked the doc but I could not find a method for it. I want to de cross validation, so I kind of need it. Note that I'm not asking how to split a tensor, as I know that TensorFlow provides an API for that an has been answered in another question. I'm asking on how to partition a tf.Dataset (which is an abstraction). 回答1: You could either: 1) Use the shard transformation partition the dataset into multiple "shards". Note that for best performance, sharding should be to data sources (e.g.