更新时间:2021-03-18 GMT+08:00
te.lang.cce.vexp(raw_tensor)
对tensor中的每个元素做自然指数运算e^x,支持的类型:float16。int8,uint8,int32,float32类型会被转换为float16。
该接口在elewise_compute.py中定义。
参数说明
raw_tensor:输入tensor,tvm.tensor类型。
返回值
res_tensor:表示e^(raw_tensor),tvm.tensor类型。
调用示例
shape = (1024,1024) input_dtype = "float16" data = tvm.placeholder(shape, name="data", dtype=input_dtype) res = te.lang.cce.vexp(data)
父主题: compute接口