diff --git a/mace/kernels/opencl/cl/relu.cl b/mace/kernels/opencl/cl/relu.cl index 17d391658e367e7b862ff713c177766a70e203f3..c8ea1c092f898b912db90555fd3309d7d21d349a 100644 --- a/mace/kernels/opencl/cl/relu.cl +++ b/mace/kernels/opencl/cl/relu.cl @@ -10,7 +10,7 @@ __kernel void relu(__read_only image2d_t input, const int pos = ch_blk * width + w; DATA_TYPE4 in = READ_IMAGET(input, SAMPLER, (int2)(pos, hb)); - DATA_TYPE4 out = fmax(in, (DATA_TYPE4)0); + DATA_TYPE4 out = fmax(in, 0); WRITE_IMAGET(output, (int2)(pos, hb), out); } @@ -24,6 +24,6 @@ __kernel void relux(__read_only image2d_t input, const int pos = ch_blk * width + w; DATA_TYPE4 in = READ_IMAGET(input, SAMPLER, (int2)(pos, hb)); - DATA_TYPE4 out = clamp(in, (DATA_TYPE4)0, (DATA_TYPE4)max_limit); + DATA_TYPE4 out = clamp(in, 0, max_limit); WRITE_IMAGET(output, (int2)(pos, hb), out); }