nvidia.dali.fn.paste#
- nvidia.dali.fn.paste(__input, /, *, bytes_per_sample_hint=[0], fill_value, min_canvas_size=0.0, n_channels=3, paste_x=0.5, paste_y=0.5, preserve=False, ratio, device=None, name=None)#
将输入图像粘贴到更大的画布上,画布大小等于
input size * ratio
。- 支持的后端
‘gpu’
- 参数:
__input¶ (TensorList ('HWC')) – 操作符的输入。
- 关键词参数:
bytes_per_sample_hint¶ (int 或 list of int, optional, default = [0]) –
每个样本的输出大小提示,以字节为单位。
如果指定,则将预先分配驻留在 GPU 或分页锁定主机内存中的操作符输出,以容纳此大小的样本批次。
fill_value¶ (int 或 list of int) –
用于填充画布的颜色的值元组。
元组的长度必须等于
n_channels
。min_canvas_size¶ (float 或 TensorList of float, optional, default = 0.0) – 强制执行按比例缩放输入大小后的最小粘贴画布尺寸。
n_channels¶ (int, optional, default = 3) – 图像中的通道数。
paste_x¶ (float 或 TensorList of float, optional, default = 0.5) – 粘贴在 (0.0 - 1.0) 图像坐标中的水平位置。
paste_y¶ (float 或 TensorList of float, optional, default = 0.5) – 粘贴在 (0.0 - 1.0) 图像坐标中的垂直位置。
preserve¶ (bool, optional, default = False) – 即使操作符的输出未使用,也阻止从图中删除该操作符。
ratio¶ (float 或 TensorList of float) – 画布大小与输入大小的比率。必须 >= 1。
另请参阅