将输入张量从 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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
