Commit 9f12a068 authored by rusty1s's avatar rusty1s
Browse files

Merge branch 'master' of github.com:rusty1s/pytorch_scatter

parents 0e98ec12 1f3ae841
......@@ -7,4 +7,4 @@ SRC_DIR=torch_scatter/kernel
BUILD_DIR=torch_scatter/build
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
......@@ -12,7 +12,7 @@ class ScatterDiv(Scatter): # pragma: no cover
def backward_step(self, *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):
......
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