當前位置:
首頁 >
tensorflow reshape,range用法
發布時間:2025/4/5
43
豆豆
生活随笔
收集整理的這篇文章主要介紹了
tensorflow reshape,range用法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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())
總結
以上是生活随笔為你收集整理的tensorflow reshape,range用法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: tf.title
- 下一篇: tf.reshape 和 tf.tran