代码和其他资料在 github 一.tf.data模块 数据分割 import tensorflow as tf dataset = tf.data.Dataset.from_tensor_slices([1,2,3,4,5,6,7]) #1维 dataset2 = tf.data.Dataset.from_tensor_slices([[1,2],[3,4],[5,6]]) #2维 dataset_dic = tf.data.Dataset.from_tensor_slices({'a':[1…