Squeeze

Squeeze - 23

版本

  • 名稱: Squeeze (GitHub)

  • 網域: main

  • since_version: 23

  • 函數: False

  • 支援等級: SupportType.COMMON

  • 形狀推斷: True

此運算子的版本自版本 23 開始提供。

摘要

從張量的形狀中移除單維條目。採用一個輸入 axes,其中包含要擠壓的軸的列表。如果未提供 axes,則所有單維度將從形狀中移除。如果選擇的軸的形狀條目不等於一,則會引發錯誤。

輸入

介於 1 和 2 個輸入之間。

  • data (異質) - T

    至少具有 max(dims) 維度的張量。

  • axes (選用,異質) - tensor(int64)

    整數列表,指示要擠壓的維度。負值表示從後面計算維度。接受的範圍是 [-r, r-1],其中 r = rank(data)。

輸出

  • squeezed (異質) - T

    重新塑形的張量,其資料與輸入相同。

類型限制

  • T in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float4e2m1), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

    將輸入和輸出類型限制為所有張量類型,直至 IRv11。

Squeeze - 21

版本

  • 名稱: Squeeze (GitHub)

  • 網域: main

  • since_version: 21

  • 函數: False

  • 支援等級: SupportType.COMMON

  • 形狀推斷: True

此運算子的版本自版本 21 開始提供。

摘要

從張量的形狀中移除單維條目。採用一個輸入 axes,其中包含要擠壓的軸的列表。如果未提供 axes,則所有單維度將從形狀中移除。如果選擇的軸的形狀條目不等於一,則會引發錯誤。

輸入

介於 1 和 2 個輸入之間。

  • data (異質) - T

    至少具有 max(dims) 維度的張量。

  • axes (選用,異質) - tensor(int64)

    整數列表,指示要擠壓的維度。負值表示從後面計算維度。接受的範圍是 [-r, r-1],其中 r = rank(data)。

輸出

  • squeezed (異質) - T

    重新塑形的張量,其資料與輸入相同。

類型限制

  • T in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

    將輸入和輸出類型限制為所有張量類型,直至 IRv10。

Squeeze - 13

版本

  • 名稱: Squeeze (GitHub)

  • 網域: main

  • since_version: 13

  • 函數: False

  • 支援等級: SupportType.COMMON

  • 形狀推斷: True

此運算子的版本自版本 13 開始提供。

摘要

從張量的形狀中移除單維條目。採用一個輸入 axes,其中包含要擠壓的軸的列表。如果未提供 axes,則所有單維度將從形狀中移除。如果選擇的軸的形狀條目不等於一,則會引發錯誤。

輸入

介於 1 和 2 個輸入之間。

  • data (異質) - T

    至少具有 max(dims) 維度的張量。

  • axes (選用,異質) - tensor(int64)

    整數列表,指示要擠壓的維度。負值表示從後面計算維度。接受的範圍是 [-r, r-1],其中 r = rank(data)。

輸出

  • squeezed (異質) - T

    重新塑形的張量,其資料與輸入相同。

類型限制

  • T in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制輸入和輸出類型為所有張量類型。

Squeeze - 11

版本

  • 名稱: Squeeze (GitHub)

  • 網域: main

  • since_version: 11

  • 函數: False

  • 支援等級: SupportType.COMMON

  • 形狀推斷: True

此運算符的版本自第 11 版起可用。

摘要

從張量的形狀中移除單維度的條目。 接受一個參數 axes,其中包含要壓縮的軸的列表。 如果未提供 axes,則所有單一維度將從形狀中移除。 如果選取的軸的形狀條目不等於 1,則會引發錯誤。

屬性

  • axes - INTS :

    整數列表,指示要擠壓的維度。負值表示從後面計算維度。接受的範圍是 [-r, r-1],其中 r = rank(data)。

輸入

  • data (異質) - T

    至少具有 max(dims) 維度的張量。

輸出

  • squeezed (異質) - T

    重新塑形的張量,其資料與輸入相同。

類型限制

  • T in ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制輸入和輸出類型為所有張量類型。

Squeeze - 1

版本

  • 名稱: Squeeze (GitHub)

  • 網域: main

  • since_version: 1

  • 函數: False

  • 支援等級: SupportType.COMMON

  • 形狀推斷: True

此運算符的版本自第 1 版起可用。

摘要

從張量的形狀中移除單維度的條目。 接受一個參數 axes,其中包含要壓縮的軸的列表。 如果未提供 axes,則所有單一維度將從形狀中移除。 如果選取的軸的形狀條目不等於 1,則會引發錯誤。

屬性

  • axes - INTS :

    非負整數列表,指示要壓縮的維度。

輸入

  • data (異質) - T

    至少具有 max(dims) 維度的張量。

輸出

  • squeezed (異質) - T

    重新塑形的張量,其資料與輸入相同。

類型限制

  • T in ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    限制輸入和輸出類型為所有張量類型。