nvidia.dali.fn.coord_flip#
- nvidia.dali.fn.coord_flip(__input, /, *, bytes_per_sample_hint=[0], center_x=0.5, center_y=0.5, center_z=0.5, flip_x=1, flip_y=0, flip_z=0, layout='', preserve=False, device=None, name=None)#
通过相对于给定中心翻转(反射)坐标来变换向量或点。
- 支持的后端
‘cpu’
‘gpu’
- 参数:
__input¶ (TensorList) – 操作符的输入。
- 关键字参数:
bytes_per_sample_hint¶ (int 或 int 列表, 可选, 默认值 = [0]) –
每个样本的输出大小提示(以字节为单位)。
如果指定,则预先分配驻留在 GPU 或分页锁定主机内存中的操作符输出,以适应此大小的样本批次。
center_x¶ (float 或 float 的 TensorList, 可选, 默认值 = 0.5) – 水平轴上的翻转中心。
center_y¶ (float 或 float 的 TensorList, 可选, 默认值 = 0.5) – 垂直轴上的翻转中心。
center_z¶ (float 或 float 的 TensorList, 可选, 默认值 = 0.5) – 深度轴上的翻转中心。
flip_x¶ (int 或 int 的 TensorList, 可选, 默认值 = 1) – 翻转水平 (x) 坐标。
flip_y¶ (int 或 int 的 TensorList, 可选, 默认值 = 0) – 翻转垂直 (y) 坐标。
flip_z¶ (int 或 int 的 TensorList, 可选, 默认值 = 0) – 翻转深度 (z) 坐标。
layout¶ (layout str, 可选, 默认值 = ‘’) –
确定输入中坐标的顺序。
该字符串应包含以下字符
“x”(水平坐标),
“y”(垂直坐标),
“z”(深度坐标),
注意
如果留空,则根据维度数量,假定值为“x”、“xy”或“xyz”。
preserve¶ (bool, 可选, 默认值 = False) – 阻止操作符从图中移除,即使其输出未使用。