RandomUniformLike

RandomUniformLike - 22

版本

  • 名稱RandomUniformLike (GitHub)

  • 網域main

  • since_version22

  • 函式False

  • 支援等級SupportType.COMMON

  • 形狀推斷True

此運算子版本自版本 22 起可用。

摘要

產生一個張量,其隨機值取自均勻分佈。輸出張量的形狀從輸入張量的形狀複製,而均勻分佈的參數由 lowhigh 指定。

資料類型由 'dtype' 引數指定,如果未提供,則從輸入張量複製。 'dtype' 引數必須是 TensorProto 訊息中 'DataType' 列舉欄位中指定的資料類型之一,並且作為輸出類型有效。

屬性

  • dtype - INT :

    (選用) 輸出張量元素的資料類型,如果未指定,我們將使用輸入張量的資料類型。

  • high - FLOAT (預設為 '1.0')

    輸出值的上限。

  • low - FLOAT (預設為 '0.0')

    輸出值的下限。

  • seed - FLOAT :

    (選用) 隨機產生器的種子,如果未指定,我們將自動產生一個。

輸入

  • input (異質) - T1

    要從中複製形狀以及選擇性類型資訊的輸入張量。

輸出

  • output (異質) - T2

    從均勻分佈中隨機取值的輸出張量

類型限制

  • T1 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) )

    約束為任何張量類型。如果未提供 dtype 屬性,則必須是有效的輸出類型。

  • T2 in ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16) )

    將輸出類型約束為浮點張量。

RandomUniformLike - 1

版本

  • 名稱RandomUniformLike (GitHub)

  • 網域main

  • since_version1

  • 函式False

  • 支援等級SupportType.COMMON

  • 形狀推斷True

此運算子版本自版本 1 起可用。

摘要

產生一個張量,其隨機值取自均勻分佈。輸出張量的形狀從輸入張量的形狀複製,而均勻分佈的參數由 lowhigh 指定。

資料類型由 'dtype' 引數指定,如果未提供,則從輸入張量複製。 'dtype' 引數必須是 TensorProto 訊息中 'DataType' 列舉欄位中指定的資料類型之一,並且作為輸出類型有效。

屬性

  • dtype - INT :

    (選用) 輸出張量元素的資料類型,如果未指定,我們將使用輸入張量的資料類型。

  • high - FLOAT (預設為 '1.0')

    輸出值的上限。

  • low - FLOAT (預設為 '0.0')

    輸出值的下限。

  • seed - FLOAT :

    (選用) 隨機產生器的種子,如果未指定,我們將自動產生一個。

輸入

  • input (異質) - T1

    要從中複製形狀以及選擇性類型資訊的輸入張量。

輸出

  • output (異質) - T2

    從均勻分佈中隨機取值的輸出張量

類型限制

  • T1 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) )

    約束為任何張量類型。如果未提供 dtype 屬性,則必須是有效的輸出類型。

  • T2 類型限定於 ( tensor(double), tensor(float), tensor(float16) )

    將輸出類型約束為浮點張量。