README.md 570 Bytes
Newer Older
rusty1s's avatar
rusty1s committed
1
# PyTorch Scatter
rusty1s's avatar
rusty1s committed
2

rusty1s's avatar
rusty1s committed
3
4
5
6
7
8
<p align="center">
  <img width="80%" src="https://raw.githubusercontent.com/rusty1s/pytorch_scatter/master/docs/source/_figures/add.svg?sanitize=true" />
</p>

--------------------------------------------------------------------------------

rusty1s's avatar
rusty1s committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
```sh
pip install torch_scatter
```

```py
from torch_scatter import scatter_max

input = torch.Tensor([[2, 0, 1, 4, 3], [0,2, 1, 3, 4]])
torch.LongTensor([[4, 5, 2, 3], [0, 0, 2, 2, 1]])

max, arg = scatter_max_(index, input, dim=1)
```

## Features

* CPU and Cuda implementation
* Backward implementation