Metadata-Version: 2.4
Name: random-neural-net-models
Version: 0.3.2
Summary: Implementation of a random selection of artificial neural net based models.
Project-URL: Homepage, https://github.com/eschmidt42/random-neural-net-models
Project-URL: Repository, https://github.com/eschmidt42/random-neural-net-models
Project-URL: Issues, https://github.com/eschmidt42/random-neural-net-models/issues
Author-email: eschmidt42 <11818904+eschmidt42@users.noreply.github.com>
License: BSD 3-Clause License
        
        Copyright (c) 2023, Eric Schmidt
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: deep-learning,machine-learning,neural-networks
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: diffusers[torch]
Requires-Dist: einops
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pydantic
Requires-Dist: regex
Requires-Dist: rich
Requires-Dist: scikit-learn
Requires-Dist: seaborn
Requires-Dist: tabulate
Requires-Dist: tensordict
Requires-Dist: tifffile
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: tqdm
Requires-Dist: transformers
Requires-Dist: wandb
Description-Content-Type: text/markdown

# random neural nets

> Implementations of a random selection of artificial neural net based models and methods.

[![Tests](https://github.com/eschmidt42/random-neural-net-models/actions/workflows/test.yml/badge.svg)](https://github.com/eschmidt42/random-neural-net-models/actions/workflows/test.yml)
[![codecov](https://codecov.io/github/eschmidt42/random-neural-net-models/graph/badge.svg?token=43GQH6AU2U)](https://codecov.io/github/eschmidt42/random-neural-net-models)

## Python version

Development is done using [`uv`](https://docs.astral.sh/uv/getting-started/installation/), pinning the python version to the one in the file `.python-version`.

## Installation (on Linux)

```shell
pip install random-neural-net-models
```

or

```shell
uv add random-neural-net-models
```

For package development / notebooks shenanigans:

```shell
git clone https://github.com/eschmidt42/random-neural-net-models.git
cd random-neural-net-models
make install-dev-env
```


## Usage

See jupyter notebooks in [`nbs/`](https://github.com/eschmidt42/random-neural-net-models/tree/main/nbs) for:
* fastai style learner with tensordict: `learner-example.ipynb`
* perceptron: `perceptron.ipynb`
* backpropagation: `backpropagation_rumelhart1986.ipynb`
* convolution: `convolution_lecun1990.ipynb`
* cnn autoencoder:
    * mnist: `cnn_autoencoder_fastai2022.ipynb`
    * fashion mnist: `cnn_autoencoder_fastai2022_fashion.ipynb`
* variational autoencoder:
    * dense: `dense_variational_autoencoder_fastai2022.ipynb`
    * cnn+dense: `cnn_variational_autoencoder_fastai2022.ipynb`
* optimizers: `stochastic_optimization_methods.ipynb`
* resnet: `resnet_fastai2022.ipynb`
* unet:
    * `unet_fastai2022.ipynb`
    * `unet-isbi2012`
* diffusion (unet + noise):
  * `diffusion_fastai2022.ipynb`
  * `diffusion_fastai2022_learner.ipynb`
  * `diffusion_fastai2022_learner_with_attention.ipynb`
* [mingpt](https://github.com/karpathy/minGPT):
    * `mingpt_sort.ipynb`
    * `mingpt_char.ipynb`
    * `mingpt_adder.ipynb`
* transformer: `language-model.ipynb`
* tokenization: `tokenization.ipynb`
* tabular:
  * `tabular-fastai-classification.ipynb`
  * `tabular-fastai-classification-with-missingness.ipynb`
  * `tabular-fastai-classification-with-missingness-and-categories.ipynb`
  * `tabular-fastai-regression.ipynb`
  * `tabular-fastai-regression-with-missingness.ipynb`
  * `tabular-fastai-regression-with-missingness-and-categories.ipynb`
  * `tabular-variational-auto-encoder.ipynb`
  * `reusing-vae-for-classification.ipynb`
