From a2e45e0bac426a64c6304d7b529c3f353745de34 Mon Sep 17 00:00:00 2001 From: cwang Date: Fri, 5 Oct 2018 19:05:13 -0500 Subject: [PATCH] fix the ghost problem and (temorarily) divided by zero sum problem --- neural_renderer/cuda/load_textures_cuda_kernel.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_renderer/cuda/load_textures_cuda_kernel.cu b/neural_renderer/cuda/load_textures_cuda_kernel.cu index 848f0a9..57097e2 100644 --- a/neural_renderer/cuda/load_textures_cuda_kernel.cu +++ b/neural_renderer/cuda/load_textures_cuda_kernel.cu @@ -41,7 +41,7 @@ __global__ void load_textures_cuda_kernel( scalar_t dim0 = ((i / (ts * ts)) % ts) / (ts - 1.) ; scalar_t dim1 = ((i / ts) % ts) / (ts - 1.); scalar_t dim2 = (i % ts) / (ts - 1.); - if (1 < dim0 + dim1 + dim2) { + if (0 < dim0 + dim1 + dim2) { float sum = dim0 + dim1 + dim2; dim0 /= sum; dim1 /= sum;