Neural Network Dataset
Project description
Neural Network Dataset
short alias lmur
LEMUR - Learning, Evaluation, and Modeling for Unified Research
The original version of the LEMUR dataset was created by Arash Torabi Goodarzi, Roman Kochnev and Zofia Antonina Bentyn at the Computer Vision Laboratory, University of Würzburg, Germany.
Overview 📖
NN Dataset project provides flexibility for dynamically combining various deep learing tasks, datasets, metrics, and neural network models. It is designed to facilitate the verification of neural network performance under various combinations of training hyperparameters and data transformation algorithms, by automatically generating performance statistics. Developed to support the NNGPT project, this dataset contains neural network models modified or generated by NNGPT's large language models, with names featuring multiple dash-separated alphanumeric postfixes (regex: ^.+(-[\w\d]{4,}){4,}$).Create and Activate a Virtual Environment (recommended)
For Linux/Mac:
python3 -m venv .venv
source .venv/bin/activate
For Windows:
python3 -m venv .venv
.venv\Scripts\activate
It is also assumed that CUDA 12.6 is installed. If you have a different version, please replace 'cu126' with the appropriate version number.
Environment for NN Dataset Contributors
Pip package manager
Create a virtual environment, activate it, and run the following command to install all the project dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu126
Installation or Update of the NN Dataset
Remove an old version of the LEMUR Dataset and its database:
pip uninstall nn-dataset -y
rm -rf db
Installing the stable version:
pip install nn-dataset --upgrade --extra-index-url https://download.pytorch.org/whl/cu126
Installing from GitHub to get the most recent code and statistics updates:
pip install git+https://github.com/ABrain-One/nn-dataset --upgrade --force --extra-index-url https://download.pytorch.org/whl/cu126
Adding functionality to export data to Excel files and generate plots for analyzing neural network performance:
pip install nn-stat --upgrade --extra-index-url https://download.pytorch.org/whl/cu126
and export/generate:
python -m ab.stat.export
Usage
Standard use cases:
- Add a new neural network model into the
ab/nn/nndirectory. - Run the automated training process for this model (e.g., a new ComplexNet training pipeline configuration):
python -m ab.nn.train -c img-classification_cifar-10_acc_ComplexNet
or for all image segmentation models using a fixed range of training parameters and transformer:
python run.py -c img-segmentation -f echo --min_learning_rate 1e-4 -l 1e-2 --min_momentum 0.8 -m 0.99 --min_batch_binary_power 2 -b 6
To reproduce the previous result, set the minimum and maximum to the same desired values:
python run.py -c img-classification_cifar-10_acc_AlexNet --min_learning_rate 0.0061 -l 0.0061 --min_momentum 0.7549 -m 0.7549 --min_batch_binary_power 2 -b 2 -f norm_299
To view supported flags:
python run.py -h
Docker
All versions of this project are compatible with AI Linux and can be run inside a Docker image:
docker run -v /a/mm:. abrainone/ai-linux bash -c "PYTHONPATH=/a/mm python -m ab.nn.train"
Some recently added dependencies might be missing in the AI Linux. In this case, you can create a container from the Docker image abrainone/ai-linux, install the missing packages (preferably using pip install <package name>), and then create a new image from the container using docker commit <container name> <new image name>. You can use this new image locally or push it to the registry for deployment on the computer cluster.
Contribution
To contribute a new neural network (NN) model to the NN Dataset, please ensure the following criteria are met:
- The code for each model is provided in a respective ".py" file within the /ab/nn/nn directory, and the file is named after the name of the model's structure.
- The main class for each model is named Net.
- The constructor of the Net class takes the following parameters:
- in_shape (tuple): The shape of the first tensor from the dataset iterator. For images it is structured as
(batch, channel, height, width). - out_shape (tuple): Provided by the dataset loader, it describes the shape of the output tensor. For a classification task, this could be
(number of classes,). - prm (dict): A dictionary of hyperparameters, e.g.,
{'lr': 0.24, 'momentum': 0.93, 'dropout': 0.51}. - device (torch.device): PyTorch device used for the model training
- in_shape (tuple): The shape of the first tensor from the dataset iterator. For images it is structured as
- All external information required for the correct building and training of the NN model for a specific dataset/transformer, as well as the list of hyperparameters, is extracted from in_shape, out_shape or prm, e.g.:
batch = in_shape[0]channel_number = in_shape[1]image_size = in_shape[2]class_number = out_shape[0]learning_rate = prm['lr']momentum = prm['momentum']dropout = prm['dropout']. - Every model script has function returning set of supported hyperparameters, e.g.:
def supported_hyperparameters(): return {'lr', 'momentum', 'dropout'}
The value of each hyperparameter lies within the range of 0.0 to 1.0. - Every class Net implements two functions:
train_setup(self, prm)
andlearn(self, train_data)
The first function initializes thecriteriaandoptimizer, while the second implements the training pipeline. See a simple implementation in the AlexNet model. - For each pull request involving a new NN model, please generate and submit training statistics for 100 Optuna trials (or at least 3 trials for very large models) in the ab/nn/stat directory. The trials should cover 5 epochs of training. Ensure that this statistics is included along with the model in your pull request. For example, the statistics for the ComplexNet model are stored in files <epoch number>.json inside folder img-classification_cifar-10_acc_ComplexNet, and can be generated by:
python run.py -c img-classification_cifar-10_acc_ComplexNet -t 100 -e 5
See more examples of models in /ab/nn/nn and generated statistics in /ab/nn/stat.
Available Modules
The NN Dataset includes the following key modules within the ab.nn package:
- nn: Predefined neural network architectures, including models like
AlexNet,ResNet,VGG, and more. - loader: Data loading utilities for popular datasets such as CIFAR-10, COCO, and others.
- metric: Evaluation metrics supported for model assessment, such as accuracy, Intersection over Union (IoU), and others.
- transform: A collection of data transformation algorithms for dataset preprocessing and augmentation.
- stat: Statistics for different neural network model training pipelines.
- util: Utility functions designed to assist with training, model evaluation, and statistical analysis.
Citation
If you find the LEMUR Neural Network Dataset to be useful for your research, please consider citing our article:
@article{ABrain.NN-Dataset,
title={LEMUR Neural Network Dataset: Towards Seamless AutoML},
author={Goodarzi, Arash Torabi and Kochnev, Roman and Khalid, Waleed and Qin, Furui and Uzun, Tolgay Atinc and Dhameliya, Yashkumar Sanjaybhai and Kathiriya, Yash Kanubhai and Bentyn, Zofia Antonina and Ignatov, Dmitry and Timofte, Radu},
journal={arXiv preprint arXiv:2504.10552},
year={2025}
}
Licenses
This project is distributed under the following licensing terms:
- for neural network models adopted from other projects
- Python code under the legacy MIT or BSD 3-Clause license
- models with pretrained weights under the legacy DeepSeek LLM V2 license
- all neural network models and their weights not covered by the above licenses, as well as all other files and assets in this project, are subject to the MIT license
The idea and leadership of Dr. Ignatov
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nn_dataset-1.2.5.tar.gz.
File metadata
- Download URL: nn_dataset-1.2.5.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61c241edaf6f95aa3a9b6fe224f7458bdaf8b48a9bb5df5fd5815cc15578adac
|
|
| MD5 |
b0ead828f1f74c0b977a2e44b84ad1e6
|
|
| BLAKE2b-256 |
0b6606be08b994c116522dcb75bff955802cfe455e4ee23c815e2fa60dc83217
|
File details
Details for the file nn_dataset-1.2.5-py3-none-any.whl.
File metadata
- Download URL: nn_dataset-1.2.5-py3-none-any.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ced962002b2169f5fcda88a218c74dc4ac96b479d0c685571355dd4fa99ea67a
|
|
| MD5 |
b4f92c5bba6231ff0bd8591313ed7017
|
|
| BLAKE2b-256 |
2d122fa98c85f4400eda7a6f650ca5693b7eacf27af9a471b7ee1d9354243ece
|