CastOp

公用類別 CastOp

TensorBuffer 轉換為指定的資料類型。

公用建構函式

CastOp(DataType destinationType)
建構 CastOp。

公用方法

TensorBuffer

繼承的方法

公用建構函式

public CastOp (DataType destinationType)

建構 CastOp。

注意:如要立即針對特定 TensorBuffer (而非在處理器中) 進行轉換類型,請直接使用 TensorBuffer.createFrom(TensorBuffer, DataType)

執行此運算時,如果原始的 TensorBuffer 已在 destinationType 中,系統會直接傳回原始緩衝區。

參數
destinationType 要投放的 TensorBuffer 類型。
擲回
IllegalArgumentException 表示 destinationType 不是 DataType.UINT8DataType.FLOAT32

公用方法

公開 TensorBuffer 套用 (TensorBuffer 輸入)

參數
輸入