Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nerfacc
Commits
e547490c
Unverified
Commit
e547490c
authored
Mar 27, 2023
by
Loïc Magne
Committed by
GitHub
Mar 26, 2023
Browse files
scatter_add_ -> index_add_ (#179)
parent
9a1c0ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
nerfacc/vol_rendering.py
nerfacc/vol_rendering.py
+1
-2
No files found.
nerfacc/vol_rendering.py
View file @
e547490c
...
...
@@ -190,11 +190,10 @@ def accumulate_along_rays(
n_rays
=
int
(
ray_indices
.
max
())
+
1
# assert n_rays > ray_indices.max()
index
=
ray_indices
[:,
None
].
expand
(
-
1
,
src
.
shape
[
-
1
])
outputs
=
torch
.
zeros
(
(
n_rays
,
src
.
shape
[
-
1
]),
device
=
src
.
device
,
dtype
=
src
.
dtype
)
outputs
.
scatter
_add_
(
0
,
index
,
src
)
outputs
.
index
_add_
(
0
,
ray_indices
,
src
)
return
outputs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment