摘要: 1 tf.pad() tf.pad()函数主要是用来对tensor的大小进行扩展,包括水平、垂直、深度(通道)等,方法定义如下: pad(tensor,paddings,mode="CONSTANT",name=None,constant_values=0) 输入参数: tensor:输入的tens 阅读全文
posted @ 2020-09-30 21:55 Chenjin2018 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 1 排序 1.1 sort:返回排序后的Tensor import tensorflow as tf a = tf.random.shuffle(tf.range(6)) a <tf.Tensor: id=4, shape=(6,), dtype=int32, numpy=array([3, 2, 阅读全文
posted @ 2020-09-30 21:00 Chenjin2018 阅读(2048) 评论(0) 推荐(0) 编辑