將輸入張量從 src_format 置換到 dst_format 。
用法
tf.raw_ops.DataFormatVecPermute(
x, src_format='NHWC', dst_format='NCHW', name=None
)參數
-
x一個Tensor。必須是以下類型之一:int32,int64。源數據格式的大小為 4 的向量或形狀 (4, 2) 的張量。 -
src_format可選的string。默認為"NHWC"。源數據格式。 -
dst_format可選的string。默認為"NCHW"。目標數據格式。 -
name操作的名稱(可選)。
返回
-
一個
Tensor。具有與x相同的類型。
輸入張量必須是大小為 4 的向量,或 4x2 張量。
例如,使用 src_format of NHWC , dst_format of NCHW 和輸入:
[1, 2, 3, 4]
和
[[1, 2, 3, 4],
[5, 6, 7, 8]]
,輸出將(分別):
[1, 4, 2, 3]
和
[[1, 4, 2, 3],
[5, 8, 6, 7]]
相關用法
- Python tf.raw_ops.DecodeGif用法及代碼示例
- Python tf.raw_ops.DepthToSpace用法及代碼示例
- Python tf.raw_ops.DepthwiseConv2dNative用法及代碼示例
- Python tf.raw_ops.DeserializeManySparse用法及代碼示例
- Python tf.raw_ops.Dilation2D用法及代碼示例
- Python tf.raw_ops.Dequantize用法及代碼示例
- Python tf.raw_ops.DeserializeSparse用法及代碼示例
- Python tf.raw_ops.DynamicPartition用法及代碼示例
- Python tf.raw_ops.DiagPart用法及代碼示例
- Python tf.raw_ops.DecodeProtoV2用法及代碼示例
- Python tf.raw_ops.Diag用法及代碼示例
- Python tf.raw_ops.DynamicStitch用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.GatherV2用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.DataFormatVecPermute。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
