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
1545db53
Commit
1545db53
authored
Aug 06, 2018
by
rusty1s
Browse files
prints
parent
7febeb31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
test/test_forward.py
test/test_forward.py
+2
-0
torch_scatter/mul.py
torch_scatter/mul.py
+1
-0
No files found.
test/test_forward.py
View file @
1545db53
...
...
@@ -118,6 +118,8 @@ def test_forward(test, dtype, device):
src
=
tensor
(
test
[
'src'
],
dtype
,
device
)
index
=
tensor
(
test
[
'index'
],
torch
.
long
,
device
)
expected
=
tensor
(
test
[
'expected'
],
dtype
,
device
)
print
(
src
)
print
(
index
)
op
=
getattr
(
torch_scatter
,
'scatter_{}'
.
format
(
test
[
'name'
]))
out
=
op
(
src
,
index
,
test
[
'dim'
],
fill_value
=
test
[
'fill_value'
])
...
...
torch_scatter/mul.py
View file @
1545db53
...
...
@@ -7,6 +7,7 @@ from torch_scatter.utils.gen import gen
class
ScatterMul
(
Function
):
@
staticmethod
def
forward
(
ctx
,
out
,
src
,
index
,
dim
):
print
(
"DRIN"
)
func
=
get_func
(
'scatter_mul'
,
src
)
func
(
src
,
index
,
out
,
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