提交 6475820c 编写于 作者: D dolphin8

fix softmax opencl

上级 7110404d
......@@ -40,7 +40,7 @@ __kernel void softmax(__read_only image2d_t input_image,
rsum += exp(r - maxv);
}
half sum = rsum.x + rsum.y + rsum.z + rsum.w;
float sum = rsum.x + rsum.y + rsum.z + rsum.w;
half4 rr = read_imageh(input_image, sampler, (int2)(out_w, out_nh));
half4 result = exp(rr - maxv) / sum;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册