tf.slice()和 tf.gather()的用法

之前講過 tf.gather 根據索引去找相應維度的子集 tf.slice(input,begin,size,name=None)  按照指定的下標範圍抽取連續區域的子集 tf.gather(input,begin,size.name=None)  按照指定的下標集合從 axis=0 中抽取子集,適合抽取不連續區域的子集。 t = tf.constant([[[1, 1, 1], [2, 2, 2
相關文章
相關標籤/搜索