iT邦幫忙

2025 iThome 鐵人賽

DAY 1
0

tf.concat()

拼接張量

tf.concat(tensors, aixs)

參數介紹:

  1. tensor:連接指定張量的列表。
  2. axis:執行串聯過程的軸,是可選參數,默認值為0。
    https://ithelp.ithome.com.tw/upload/images/20250904/20168366QaSIfgUHCO.png
    https://ithelp.ithome.com.tw/upload/images/20250904/20168366OEagShmpPm.png

tf.stack

堆疊

tf.stack(tensors, axis)

參數介紹:

  1. tensor:要拼接的指定張量的列表。
  2. axis:執行拼接的維度。
    https://ithelp.ithome.com.tw/upload/images/20250904/20168366wFr9FqcsGJ.png

tf.split()

分割

tf.split(value, num_or_siz_splits, axis=0, num=None, name='split')

參數介紹:

  1. value:需切分的輸入張量。
  2. num_or_siz_splits:準備切成幾份。
  3. axis:準備在第幾個維度上進行切割。
    https://ithelp.ithome.com.tw/upload/images/20250904/20168366sKy3m5D4Ri.png

上一篇
張量的各種運算
下一篇
張量維度的擴展與壓縮
系列文
深度學習Tensorflow 2.X11
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言