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
torch-scatter
Commits
41955edc
Commit
41955edc
authored
Jan 12, 2020
by
lizz
Browse files
fix: dim shoud be int
Signed-off-by:
lizz
<
lizz@sensetime.com
>
parent
48024c15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torch_scatter/utils/gen.py
torch_scatter/utils/gen.py
+2
-1
No files found.
torch_scatter/utils/gen.py
View file @
41955edc
...
...
@@ -8,7 +8,8 @@ import torch
def
maybe_dim_size
(
index
,
dim_size
=
None
):
if
dim_size
is
not
None
:
return
dim_size
return
index
.
max
().
item
()
+
1
if
index
.
numel
()
>
0
else
0
dim
=
index
.
max
().
item
()
+
1
if
index
.
numel
()
>
0
else
0
return
int
(
dim
)
def
broadcast
(
src
,
index
,
dim
):
...
...
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