https://github.com/rish-16/nam-pytorch
Unofficial PyTorch implementation of Neural Additive Models (NAM) by Agarwal, et al.
https://github.com/rish-16/nam-pytorch
Last synced: about 1 year ago
JSON representation
Unofficial PyTorch implementation of Neural Additive Models (NAM) by Agarwal, et al.
- Host: GitHub
- URL: https://github.com/rish-16/nam-pytorch
- Owner: rish-16
- License: mit
- Created: 2021-05-27T08:24:18.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-30T05:34:29.000Z (about 5 years ago)
- Last Synced: 2025-05-22T21:33:27.343Z (about 1 year ago)
- Language: Python
- Size: 105 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nam-pytorch
Unofficial PyTorch implementation of Neural Additive Models (NAM) by Agarwal, et al. [[`abs`](https://arxiv.org/abs/2004.13912), [`pdf`](https://arxiv.org/pdf/2004.13912.pdf)]

---
## Installation
You can access `nam-pytorch` via `pip`:
```bash
$ pip install nam-pytorch
```
## Usage
```python
import torch
from nam_pytorch import NAM
nam = NAM(
num_features=784,
link_func="sigmoid"
)
images = torch.rand(32, 784)
pred = nam(images) # [32, 1]
```
## Contributing
As always, if there are any issues with / suggestions for the code, feel free to raise an issue or submit a PR.
## License
[MIT](https://github.com/rish-16/nam-pytorch/blob/main/LICENSE)