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
9f12a068
Commit
9f12a068
authored
Mar 03, 2018
by
rusty1s
Browse files
Merge branch 'master' of github.com:rusty1s/pytorch_scatter
parents
0e98ec12
1f3ae841
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
build.sh
build.sh
+1
-1
torch_scatter/functions/div.py
torch_scatter/functions/div.py
+1
-1
No files found.
build.sh
View file @
9f12a068
...
@@ -7,4 +7,4 @@ SRC_DIR=torch_scatter/kernel
...
@@ -7,4 +7,4 @@ SRC_DIR=torch_scatter/kernel
BUILD_DIR
=
torch_scatter/build
BUILD_DIR
=
torch_scatter/build
mkdir
-p
$BUILD_DIR
mkdir
-p
$BUILD_DIR
nvcc
-c
-o
$BUILD_DIR
/kernel.so
$SRC_DIR
/kernel.cu
-arch
=
sm_30
-Xcompiler
-fPIC
-shared
-I
$TORCH
/lib/include/TH
-I
$TORCH
/lib/include/THC
-I
$SRC_DIR
$(
which
nvcc
)
-c
-o
$BUILD_DIR
/kernel.so
$SRC_DIR
/kernel.cu
-arch
=
sm_30
-Xcompiler
-fPIC
-shared
-I
$TORCH
/lib/include/TH
-I
$TORCH
/lib/include/THC
-I
$SRC_DIR
torch_scatter/functions/div.py
View file @
9f12a068
...
@@ -12,7 +12,7 @@ class ScatterDiv(Scatter): # pragma: no cover
...
@@ -12,7 +12,7 @@ class ScatterDiv(Scatter): # pragma: no cover
def
backward_step
(
self
,
*
data
):
def
backward_step
(
self
,
*
data
):
grad
,
output
,
index
,
input
=
data
grad
,
output
,
index
,
input
=
data
return
(
grad
/
output
.
data
).
gather
(
self
.
dim
,
index
.
data
)
*
input
.
data
return
(
output
.
data
/
grad
).
gather
(
self
.
dim
,
index
.
data
)
*
input
.
data
def
scatter_div_
(
output
,
index
,
input
,
dim
=
0
):
def
scatter_div_
(
output
,
index
,
input
,
dim
=
0
):
...
...
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