Skip to content

Commit 82838e1

Browse files
committed
update readme
1 parent 7fd9091 commit 82838e1

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

README.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,22 @@
2222

2323
**[Documentation](https://pytorch-scatter.readthedocs.io)**
2424

25-
This package consists of a small extension library of highly optimized sparse update (scatter) operations for the use in [PyTorch](http://pytorch.org/), which are missing in the main package.
26-
Scatter operations can be roughly described as reduce operations based on a given "group-index" tensor.
25+
This package consists of a small extension library of highly optimized sparse update (scatter/segment) operations for the use in [PyTorch](http://pytorch.org/), which are missing in the main package.
26+
Scatter and segment operations can be roughly described as reduce operations based on a given "group-index" tensor.
2727
The package consists of the following operations:
2828

29-
* [**Scatter Add**](https://pytorch-scatter.readthedocs.io/en/latest/functions/add.html)
30-
* [**Scatter Sub**](https://pytorch-scatter.readthedocs.io/en/latest/functions/sub.html)
31-
* [**Scatter Mul**](https://pytorch-scatter.readthedocs.io/en/latest/functions/mul.html)
32-
* [**Scatter Div**](https://pytorch-scatter.readthedocs.io/en/latest/functions/div.html)
33-
* [**Scatter Mean**](https://pytorch-scatter.readthedocs.io/en/latest/functions/mean.html)
34-
* [**Scatter Std**](https://pytorch-scatter.readthedocs.io/en/latest/functions/std.html)
35-
* [**Scatter Min**](https://pytorch-scatter.readthedocs.io/en/latest/functions/min.html)
36-
* [**Scatter Max**](https://pytorch-scatter.readthedocs.io/en/latest/functions/max.html)
37-
* [**Scatter LogSumExp**](https://pytorch-scatter.readthedocs.io/en/latest/functions/logsumexp.html)
29+
* [**Scatter**](https://pytorch-scatter.readthedocs.io/en/latest/functions/add.html)
30+
* [**SegmentCOO**](https://pytorch-scatter.readthedocs.io/en/latest/functions/add.html)
31+
* [**SegmentCSR**](https://pytorch-scatter.readthedocs.io/en/latest/functions/add.html)
3832

3933
In addition, we provide composite functions which make use of `scatter_*` operations under the hood:
4034

35+
* [**Scatter Std**](https://pytorch-scatter.readthedocs.io/en/latest/composite/softmax.html#torch_scatter.composite.scatter_std)
36+
* [**Scatter LogSumExp**](https://pytorch-scatter.readthedocs.io/en/latest/composite/softmax.html#torch_scatter.composite.scatter_logsumexp)
4137
* [**Scatter Softmax**](https://pytorch-scatter.readthedocs.io/en/latest/composite/softmax.html#torch_scatter.composite.scatter_softmax)
4238
* [**Scatter LogSoftmax**](https://pytorch-scatter.readthedocs.io/en/latest/composite/softmax.html#torch_scatter.composite.scatter_log_softmax)
4339

44-
All included operations are broadcastable, work on varying data types, and are implemented both for CPU and GPU with corresponding backward implementations.
40+
All included operations are broadcastable, work on varying data types, are implemented both for CPU and GPU with corresponding backward implementations, and are fully traceable via `@torch.jit.script`.
4541

4642
## Installation
4743

@@ -81,17 +77,17 @@ from torch_scatter import scatter_max
8177
src = torch.tensor([[2, 0, 1, 4, 3], [0, 2, 1, 3, 4]])
8278
index = torch.tensor([[4, 5, 4, 2, 3], [0, 0, 2, 2, 1]])
8379

84-
out, argmax = scatter_max(src, index, fill_value=0)
80+
out, argmax = scatter_max(src, index, dim=-1)
8581
```
8682

8783
```
8884
print(out)
89-
tensor([[ 0, 0, 4, 3, 2, 0],
90-
[ 2, 4, 3, 0, 0, 0]])
85+
tensor([[0, 0, 4, 3, 2, 0],
86+
[2, 4, 3, 0, 0, 0]])
9187
9288
print(argmax)
93-
tensor([[-1, -1, 3, 4, 0, 1]
94-
[ 1, 4, 3, -1, -1, -1]])
89+
tensor([[5, 5, 3, 4, 0, 1]
90+
[1, 4, 3, 5, 5, 5]])
9591
```
9692

9793
## Running tests

0 commit comments

Comments
 (0)