tensorflow reshape,range用法
生活随笔
收集整理的這篇文章主要介紹了
tensorflow reshape,range用法
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
import tensorflow as tf
x= tf.constant([[[2,3],[4,5]],[[6,7],[8,9]]],tf.int32)d1=tf.range(0, tf.shape(x)[0])print(d1.numpy())d2=tf.tile( d1, multiples=[tf.shape(x)[1]])print(d2.numpy())d3=tf.reshape(d2,shape = tf.shape(x)[:-1])print(d3.numpy())
總結(jié)
以上是生活随笔為你收集整理的tensorflow reshape,range用法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: tf.title
- 下一篇: tf.reshape 和 tf.tran