Home
last modified time | relevance | path

Searched refs:y_lerp (Results 1 – 6 of 6) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32_grad/
Dresize_grad.c85 float y_lerp = in_y - floorf(in_y); in ResizeBiLinearGrad() local
86 const float inverse_y_lerp = 1.0 - y_lerp; in ResizeBiLinearGrad()
104 … out_addr[out_offset_bottom_y_left_x] += in_addr[in_offset] * (float)(y_lerp * inverse_x_lerp); in ResizeBiLinearGrad()
105 out_addr[out_offset_bottom_y_right_x] += in_addr[in_offset] * (float)(y_lerp * x_lerp); in ResizeBiLinearGrad()
125 const float y_lerp = in_y - floorf(in_y); in ResizeBiLinearGrad() local
126 const float inverse_y_lerp = 1.0 - y_lerp; in ResizeBiLinearGrad()
138 in_addr[h * in_width + w] * (float)(y_lerp * inverse_x_lerp); in ResizeBiLinearGrad()
140 in_addr[h * in_width + w] * (float)(y_lerp * x_lerp); in ResizeBiLinearGrad()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16_grad/
Dresize_grad.c84 float16_t y_lerp = in_y - floorf(in_y); in ResizeBiLinearFp16Grad() local
85 const float16_t inverse_y_lerp = 1.0 - y_lerp; in ResizeBiLinearFp16Grad()
103 … out_addr[out_offset_bottom_y_left_x] += in_addr[in_offset] * (float16_t)(y_lerp * inverse_x_lerp); in ResizeBiLinearFp16Grad()
104 … out_addr[out_offset_bottom_y_right_x] += in_addr[in_offset] * (float16_t)(y_lerp * x_lerp); in ResizeBiLinearFp16Grad()
122 const float16_t y_lerp = in_y - floorf(in_y); in ResizeBiLinearFp16Grad() local
123 const float16_t inverse_y_lerp = 1.0 - y_lerp; in ResizeBiLinearFp16Grad()
135 in_addr[h * in_width + w] * (float16_t)(y_lerp * inverse_x_lerp); in ResizeBiLinearFp16Grad()
137 in_addr[h * in_width + w] * (float16_t)(y_lerp * x_lerp); in ResizeBiLinearFp16Grad()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dresize_bilinear_grad_cpu_kernel.cc130 const float y_lerp = in_y - floorf(in_y); in LaunchKernel() local
131 const float inverse_y_lerp = 1.0 - y_lerp; in LaunchKernel()
143 cur_dloss_addr[h * in_width + w] * static_cast<float>(y_lerp * inverse_x_lerp); in LaunchKernel()
145 cur_dloss_addr[h * in_width + w] * static_cast<float>(y_lerp * x_lerp); in LaunchKernel()
Dcrop_and_resize_cpu_kernel.cc183 const float y_lerp = y_point - top_y_index; in Launch() local
204 output[pos] = top_left * (1 - y_lerp) * (1 - x_lerp) + bottom_right * y_lerp * x_lerp + in Launch()
205 top_right * (1 - y_lerp) * x_lerp + bottom_left * y_lerp * (1 - x_lerp); in Launch()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dcrop_and_resize_impl.cu75 const float y_lerp = target_y - top_y_index; in CropAndResize() local
89 output[pos] = top + (bottom - top) * y_lerp; in CropAndResize()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/
Dcommon_utils.h132 inline T ComputeLerp(T top_left, T top_right, T bottom_left, T bottom_right, T x_lerp, T y_lerp) { in ComputeLerp() argument
135 return top + (bottom - top) * y_lerp; in ComputeLerp()