Created by: 123malin
新增4个python API: index_select、roll、cross、nonzero,路径在paddle/tensor/目录下,以index_select为例,调用方式说明如下:
import paddle
import paddle.fluid as fluid
x = fluid.data(name="data", shape=[None, 32, 32], dtype="float32")
index = fluid.data(name="index", shape=[5], dtype="int32")
out = paddle.index_select(x, index, dim=1)
新增3个C++ OP:cross, index_select, roll 扩展原where_index op,增加对double、float、init、int64_t、bool的输入类型支持,对应的python api(fluid.layers.where)增加动态图支持。paddle.tensor.nonzero api通过调用fluid.layers.where及fluid.layers.slice实现其功能。