A project featuring methods for optimizing neural networks using PyTorch.
Project description
Cartesian Genetic Programming for CNN Optimization
Project for optimizing convolutional neural networks using Cartesian genetic programming!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
This project is a framework designed to streamline the optimization of convolutional neural networks (CNNs) using Cartesian Genetic Programming (CGP). It provides a structured environment that follows best practices for machine learning projects, including modularity, scalability, and easy deployment.
The project leverages a cookiecutter template, which ensures consistent structure and workflow for your projects.
You can easily fork the repository, suggest changes, or contribute to ongoing improvements!
Built With
This project is built using several major frameworks and libraries that streamline the development of machine learning models and help with experiment tracking and documentation. Below are the key technologies used:
Getting Started
To get a local copy of this project up and running, follow these simple steps.
Prerequisites
You need Python 3.10 or newer. Below are two options for setting up the environment:
-
Using Conda:
conda create -n cgp-cnn-env python=3.10 -y conda activate cgp-cnn-env pip install .
-
Using venv:
python -m venv cgp-cnn-env source cgp-cnn-env/bin/activate # On Windows: cgp-cnn-env\Scripts\activate pip install .
For additional dependencies, install with:
pip install .[basic] # or [dev], [doc], [all]
Alternatively, install the library directly via pip:
pip install cgp-cnn
To verify the Python version and environment setup:
python --version
Check if PyTorch can use a GPU and check the number of CPU cores available:
python -c "import os; print(os.cpu_count()); import torch; print(torch.cuda.is_available())"
Makefile Commands
make lint
make clean_linux
make generate_package
make generate_documentation
make install
make publish
make mlflow
Makefile Commands for Windows (using mingw32-make)
mingw32-make lint
mingw32-make clean_windows
mingw32-make generate_package
mingw32-make generate_documentation
mingw32-make install
mingw32-make publish
mingw32-make mlflow
SLURM Commands
https://docs.cyfronet.pl/display/~plgpawlik/Athena
module list
module avail
module load Python/3.10.4
module unload Python/3.10.4
module spider
module spider python
module spider Python/3.11.5
sinfo
scontrol show partition
scancel 873986
sbatch job.sh
squeue
scontrol show job
hpc-grants
hpc-fs
hpc-jobs
hpc-jobs-history
source ~/athena_env/bin/activate
chmod +x script.py script.sh
!!!! UTF-8 UNIX
du -sh $HOME/*
du -h --max-depth=1 $HOME
rm -rf $HOME/.cache/*
rm -rf logs/error_*.txt logs/result_*.txt
Usage
To ensure an easy introduction to the library, all examples that can be quickly executed are provided as Jupyter notebooks located in the notebooks directory. These notebooks are designed to demonstrate the functionality of the framework and guide you through the process of optimizing CNNs using Cartesian Genetic Programming.
License
Distributed under the MIT License. See LICENSE for more information.
Acknowledgments
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 cgpcnn-0.1.2.tar.gz.
File metadata
- Download URL: cgpcnn-0.1.2.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec622195ec7feb3fb051ff99af1dfee89291818ad9734c3a61ec279f32cd57b3
|
|
| MD5 |
00d7122381863cc43fd7b3a7d65735cd
|
|
| BLAKE2b-256 |
962cdda6db30a531616ffbbcf1b0cd1db7fb5e62c97b6ea31a978f173ab30dca
|
File details
Details for the file cgpcnn-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cgpcnn-0.1.2-py3-none-any.whl
- Upload date:
- Size: 36.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc364236112169b949b224df7ac04e97a8e4113435e0d2d717524b43496ef17b
|
|
| MD5 |
b7aa35ec1afc8006f64a33dce8e4d8d0
|
|
| BLAKE2b-256 |
7155de961a47fbd9757a3e24b679df8223930c225af2d273cf4a9eae83766baa
|