Skip to main content

Interpolating Neural Networks

Project description

INN

Interpolating Neural Network

This is the github repo for the paper "Interpolating neural network (INN): A novel unification of machine learning and interpolation theory".

INN is a lightweight yet precise network architecture that can replace MLPs for data training, partial differential equation (PDE) solving, and parameter calibration. The key features of INNs are:

  • Less trainable parameters than MLP without sacrificing accuracy
  • Faster and proven convergent behavior
  • Fully differntiable and GPU-optimized

Installation

Clone the repository:

git clone https://github.com/hachanook/pyinn.git
cd pyinn

Create a conda environment:

conda clean --all # [optional] to clear cache files in the base conda environment
conda env create -f environment.yaml
or
conda install -n base -c conda-forge mamba # [optional] install mamba in the base conda environment
mamba env create -f environment.yaml # this makes installation faster

conda activate pyinn-env

Install JAX

  • See jax installation instructions. Depending on your hardware, you may install the CPU or GPU version of JAX. Both will work, while GPU version usually gives better performance.
  • For CPU only (Linux/macOS/Windows), one can simply install JAX using:
pip install -U jax
  • For GPU (NVIDIA, CUDA 12)
pip install -U "jax[cuda12]"
  • For TPU (Google Cloud TPU VM)
pip install -U "jax[tpu]" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html

Install Optax (optimization library of JAX)

pip install optax

Then there are two options to continue:

Option 1

Install the package locally:

pip install -e .

Option 2

Install the package from the PyPI release directly:

pip install pyinn

Quick test

python ./pyinn/main.py

License

This project is licensed under the GNU General Public License v3 - see the LICENSE for details.

Citations

If you found this library useful in academic or industry work, we appreciate your support if you consider 1) starring the project on Github, and 2) citing relevant papers:

@article{park2024engineering,
  title={Engineering software 2.0 by interpolating neural networks: unifying training, solving, and calibration},
  author={Park, Chanwook and Saha, Sourav and Guo, Jiachen and Zhang, Hantao and Xie, Xiaoyu and Bessa, Miguel A and Qian, Dong and Chen, Wei and Wagner, Gregory J and Cao, Jian and others},
  journal={arXiv preprint arXiv:2404.10296},
  year={2024}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyinn-0.1.3.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyinn-0.1.3-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file pyinn-0.1.3.tar.gz.

File metadata

  • Download URL: pyinn-0.1.3.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for pyinn-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3552cddb972e052a75706234adae97f4e979b8ae61be33d34f4efb70407afd35
MD5 bb0d96e63551c8dfab47fac9a65a30e3
BLAKE2b-256 8da6024d45fc264d90b2367841ab60e1243ad91490a4dd65c5aa9e4f5b40669f

See more details on using hashes here.

File details

Details for the file pyinn-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pyinn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for pyinn-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dd6c0a22a61ddf282ea0a3eebb72d72273d1562ccbccb30a02a10b7268294b4f
MD5 2b1514c6793ba1e2687d5660ff425ac8
BLAKE2b-256 da17fec5322f42b1737f8c1e9fcdcf0933fb12eec2a1a9e3342b5dc8bfedbfac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page