Skip to content

Commit

Permalink
Merge pull request #27 from czw0078/master
Browse files Browse the repository at this point in the history
fix the ghost problem and divided by zero sum problem
  • Loading branch information
nkolot authored Oct 8, 2018
2 parents 534e206 + a2e45e0 commit 69506a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_renderer/cuda/load_textures_cuda_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69506a8

Please sign in to comment.