An easy-to-use PyTorch implementation of the Kolmogorov Arnold Network
Reason this release was yanked:
Updated with a newer model
Project description
TorchKAN: Simplified KAN Model Evaluation
This project demonstrates the training, validation, and quantization of the KAN model using PyTorch with CUDA acceleration. The torchkan
model evaluates performance on the MNIST dataset, providing insights into the capabilities of Generalized Additive Models (GAMs).
Project Status: Under Development
The KAN model has shown promising results amidst various GAMs since the 1980s. This implementation, inspired by various sources, achieves over 97% accuracy on the MNIST dataset. As this model is still under study, further exploration into its full capabilities is ongoing.
Prerequisites
Ensure you have the following installed on your system:
- Python (version 3.9 or higher)
- CUDA Toolkit (corresponding to your PyTorch installation's CUDA version)
- cuDNN (compatible with your installed CUDA Toolkit)
Installation
Tested on MacOS and Linux.
1. Clone the Repository
Clone the torchkan
repository and set up the project environment:
git clone https://github.com/1ssb/torchkan.git
cd torchkan
pip install -r requirements.txt
2. Configure CUDA environment variables if they are not already set:
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
3. Configure Weights & Biases (wandb)
To track experiments and model performance with wandb:
- Set Up wandb Account:
- Sign up or log in at Weights & Biases.
- Find your API key in your account settings.
- Initialize wandb in Your Project:
Before running the training script, initialize wandb:
wandb login
When prompted, enter your API key. This will link your script executions to your wandb account.
- Make sure to change the Entity name in the
mnist.py
file to your username instead of1ssb
This script will train the model, validate it, and log performance metrics using wandb.
Contact
For any inquiries or support, contact: Subhransu.Bhattacharjee@anu.edu.au
Contributions
Contributions are welcome. Please raise issues as necessary after commit "Fin.", scheduled end-June, 2024. The code is licensed under the MIT License.
References
- [0] Ziming Liu et al., "KAN: Kolmogorov-Arnold Networks", 2024, arXiv. https://arxiv.org/abs/2404.19756
- [1] https://github.com/KindXiaoming/pykan
- [2] https://github.com/Blealtan/efficient-kan
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file TorchKAN-0.1.0.tar.gz
.
File metadata
- Download URL: TorchKAN-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ee27255c58c6d63a915142f08040317435173fa51c1a22787c0ac274b7131f5 |
|
MD5 | db577277578c69af230aec278cd3878d |
|
BLAKE2b-256 | 5cbbe6273d09ebc3d2f27258d0fc9d6ef82681abc5d9fcebe912009346b5b3a4 |
File details
Details for the file TorchKAN-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: TorchKAN-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8cdbd691a7e958dbfa4ffd602b6dd335a80fb87e743936dcedc113582fd33f8 |
|
MD5 | 5b7a5dba97dd12d332f5b2c3055a7db8 |
|
BLAKE2b-256 | f21fc53e2025b083f30253a53774ef65da3e5997979a6d5afac6e9fd808f8826 |