跳跃电话

文章
5
资源
0
加入时间
3年2月3天

tf2 数据处理

import tensorflow as tfdataset = tf.data.Dataset.from_tensor_slices(([[1,2],[2,3],[3,4],[1,2],[2,3],[ 3,4]],[4,5,6,4,5,6]))dataset = dataset.batch(2)for i in dataset: print(i)(<tf.Tensor: id=12, shape=(2, 2), dtype=int32, numpy=array([[1, 2