Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
switch to built-in functions for artificial NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
Hao Jin committed Jun 5, 2018
1 parent 9a56996 commit 4115730
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/operator/nn/pool.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ __global__ void pool_sum_3d_gpu_kernel(const int nthreads, const DType* in_data,
}
}
out_data[index] = (pool_size == 0) ?
DType(0.0f / pool_size) :
DType(nanf("")) :
a_root_p<DType, p>::Map(sum);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/operator/nn/pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ inline void pool_sum_3d_cpu(const DType* in_data, const TShape& ishape, const TS
}
}
out_data[(pd*pooled_height+ph)*pooled_width+pw] = (pool_size == 0) ?
DType(0.0f / pool_size) :
DType(nanf("")) :
a_root_p<DType, p>::Map(sum);
}
}
Expand Down

0 comments on commit 4115730

Please sign in to comment.