gather

功能说明

获取输入Tensor的特定维度中指定索引的切片数据。

例如:

调用此接口,则代表需要在params的第0维中,分别取索引为2和索引为0的数,结果如下所示:

gather_tensor = [[7,8,9], [1,2,3]]

函数原型

gather(params, indices, axis=None, batch_dims=0, impl_mode="support_out_of_bound_index")

参数说明

返回值

gather_tensor:执行gather之后的Tensor,tvm.tensor类型

约束说明

支持的型号

Atlas 训练系列产品

Atlas 推理系列产品

Atlas 200I/500 A2推理产品

Atlas A2训练系列产品

调用示例