Commit a353f274 authored by rusty1s's avatar rusty1s
Browse files
parents eae34d5d 7ce4c1ca
...@@ -8,8 +8,8 @@ at::Tensor grid(at::Tensor pos, at::Tensor size, at::Tensor start, ...@@ -8,8 +8,8 @@ at::Tensor grid(at::Tensor pos, at::Tensor size, at::Tensor start,
num_voxels = num_voxels.cumprod(0); num_voxels = num_voxels.cumprod(0);
num_voxels = at::cat({at::ones(1, num_voxels.options()), num_voxels}, 0); num_voxels = at::cat({at::ones(1, num_voxels.options()), num_voxels}, 0);
auto index = empty(size.size(0), num_voxels.options()); auto index = at::empty(size.size(0), num_voxels.options());
arange_out(index, size.size(0)); at::arange_out(index, size.size(0));
num_voxels = num_voxels.index_select(0, index); num_voxels = num_voxels.index_select(0, index);
auto cluster = (pos / size.view({1, -1})).toType(at::kLong); auto cluster = (pos / size.view({1, -1})).toType(at::kLong);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment