# TorchCNNBuilder
<div id="badges">
<a href="https://pytorch.org/">
<img src="https://img.shields.io/badge/pytorch-CB2C31?style=flat&logo=pytorch&logoColor=white" alt="pytorch badge"/>
</a>
<img alt="Dynamic JSON Badge" src="https://img.shields.io/pypi/pyversions/torch">
<a href="https://badge.fury.io/py/torchcnnbuilder">
<img src="https://badge.fury.io/py/torchcnnbuilder.svg" alt="PyPI version" height="18">
</a>
</div>
---
**TorchCNNBuilder** is an open-source framework for the automatic creation of CNN architectures. This framework should first of all help researchers in the applicability of CNN models for a huge range of tasks, taking over most of the writing of the architecture code. This framework is distributed under the 3-Clause BSD license. All the functionality is written only using `pytorch` *(no third-party dependencies)*.
### Installation
---
The simplest way to install framework is using `pip`:
```
pip install torchcnnbuilder
```
### Usage examples
---
The basic structure of the framework is presented below. Each subdirectory has its own example of using the appropriate available functionality. You can check [`examples`](./examples/README.md) files in order to see the ways to use the proposed toolkit. In short, there is the following functionality:
- the ability to calculate the size of tensors after (transposed) convolutional layers
- preprocessing an n-dimensional time series in `TensorDataset`
- automatic creation of (transposed) convolutional sequences
- automatic creation of (transposed) convolutional layers and (transposed) blocks from convolutional layers
The structure of the main part of the package:
```
├── examples
│ ├── examples.ipynb
│ ├── builder_examples.ipynb
│ ├── preprocess_examples.ipynb
│ └── models_examples.ipynb
└── torchcnnbuilder
├── preprocess
│ └── time_series.py
├── builder.py
└── models.py
```
Initially, the library was created to help predict n-dimensional time series *(geodata)*, so there is a corresponding functionality and templates of predictive models *(like `ForecasterBase`)*.
### Sources
---
- [Forecasting of Sea Ice Concentration using CNN, PDE discovery and Bayesian Networks](https://www.sciencedirect.com/science/article/pii/S1877050923020094)
- [Surrogate Modelling for Sea Ice Concentration using Lightweight Neural Ensemble](https://arxiv.org/abs/2312.04330)
### Development
---
We try to maintain good practices of readable open source code. Therefore, if you want to participate in the development and open your pool request, pay attention to the following points:
- Every push is checked by the flake8 job. It will show you PEP8 errors or possible code improvements.
- Use this linter script after your code:
```bash
bash lint_and_check.sh
````
*You can mark function docstrings using `#noqa`, in order for flake8 not to pay attention to them.*
Raw data
{
"_id": null,
"home_page": "https://github.com/ChrisLisbon/TorchCNNBuilder",
"name": "torchcnnbuilder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "python torch cnn",
"author": "Andrew Kuznetsov, Julia Borisova, Nikolay O. Nikitin",
"author_email": "just.andrew.kd@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c1/a2/6ee6aa50b10ea522602f5080e78f2800fe49d46c7d193e7d3c0cfbff3f8b/torchcnnbuilder-0.1.4.tar.gz",
"platform": null,
"description": "# TorchCNNBuilder\n\n<div id=\"badges\">\n <a href=\"https://pytorch.org/\">\n <img src=\"https://img.shields.io/badge/pytorch-CB2C31?style=flat&logo=pytorch&logoColor=white\" alt=\"pytorch badge\"/>\n </a>\n <img alt=\"Dynamic JSON Badge\" src=\"https://img.shields.io/pypi/pyversions/torch\">\n <a href=\"https://badge.fury.io/py/torchcnnbuilder\">\n <img src=\"https://badge.fury.io/py/torchcnnbuilder.svg\" alt=\"PyPI version\" height=\"18\">\n </a>\n</div>\n\n---\n**TorchCNNBuilder** is an open-source framework for the automatic creation of CNN architectures. This framework should first of all help researchers in the applicability of CNN models for a huge range of tasks, taking over most of the writing of the architecture code. This framework is distributed under the 3-Clause BSD license. All the functionality is written only using `pytorch` *(no third-party dependencies)*.\n\n### Installation\n\n---\nThe simplest way to install framework is using `pip`:\n```\npip install torchcnnbuilder\n```\n\n### Usage examples\n\n---\nThe basic structure of the framework is presented below. Each subdirectory has its own example of using the appropriate available functionality. You can check [`examples`](./examples/README.md) files in order to see the ways to use the proposed toolkit. In short, there is the following functionality:\n\n- the ability to calculate the size of tensors after (transposed) convolutional layers\n- preprocessing an n-dimensional time series in `TensorDataset`\n- automatic creation of (transposed) convolutional sequences\n- automatic creation of (transposed) convolutional layers and (transposed) blocks from convolutional layers\n\nThe structure of the main part of the package:\n\n```\n\u251c\u2500\u2500 examples\n\u2502 \u251c\u2500\u2500 examples.ipynb\n\u2502 \u251c\u2500\u2500 builder_examples.ipynb\n\u2502 \u251c\u2500\u2500 preprocess_examples.ipynb\n\u2502 \u2514\u2500\u2500 models_examples.ipynb\n\u2514\u2500\u2500 torchcnnbuilder\n \u251c\u2500\u2500 preprocess\n \u2502 \u2514\u2500\u2500 time_series.py\n \u251c\u2500\u2500 builder.py\n \u2514\u2500\u2500 models.py\n```\nInitially, the library was created to help predict n-dimensional time series *(geodata)*, so there is a corresponding functionality and templates of predictive models *(like `ForecasterBase`)*.\n\n### Sources\n\n---\n- [Forecasting of Sea Ice Concentration using CNN, PDE discovery and Bayesian Networks](https://www.sciencedirect.com/science/article/pii/S1877050923020094)\n- [Surrogate Modelling for Sea Ice Concentration using Lightweight Neural Ensemble](https://arxiv.org/abs/2312.04330)\n\n### Development\n\n---\nWe try to maintain good practices of readable open source code. Therefore, if you want to participate in the development and open your pool request, pay attention to the following points:\n- Every push is checked by the flake8 job. It will show you PEP8 errors or possible code improvements.\n- Use this linter script after your code:\n```bash\nbash lint_and_check.sh\n````\n*You can mark function docstrings using `#noqa`, in order for flake8 not to pay attention to them.*\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Framework for the automatic creation of CNN architectures",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/ChrisLisbon/TorchCNNBuilder"
},
"split_keywords": [
"python",
"torch",
"cnn"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e5b06d737b60482df44fd02e35d152f980aff472654f6fb58b3324034e8f4b0b",
"md5": "75ccf2438e037a0eb0dc336f1f252213",
"sha256": "7da0233aceef38bc2a60646056eacdbd218a65c1c3f840bd46538f1e94a0cb23"
},
"downloads": -1,
"filename": "torchcnnbuilder-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "75ccf2438e037a0eb0dc336f1f252213",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 17701,
"upload_time": "2024-10-15T17:10:42",
"upload_time_iso_8601": "2024-10-15T17:10:42.676104Z",
"url": "https://files.pythonhosted.org/packages/e5/b0/6d737b60482df44fd02e35d152f980aff472654f6fb58b3324034e8f4b0b/torchcnnbuilder-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c1a26ee6aa50b10ea522602f5080e78f2800fe49d46c7d193e7d3c0cfbff3f8b",
"md5": "ba709470d01277a2eae1141b9e8dfd5c",
"sha256": "0527f06b7175d03f3c574f350c7c87eeeac882ed740109364dcf43dd55d97c3b"
},
"downloads": -1,
"filename": "torchcnnbuilder-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "ba709470d01277a2eae1141b9e8dfd5c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 15931,
"upload_time": "2024-10-15T17:10:44",
"upload_time_iso_8601": "2024-10-15T17:10:44.639169Z",
"url": "https://files.pythonhosted.org/packages/c1/a2/6ee6aa50b10ea522602f5080e78f2800fe49d46c7d193e7d3c0cfbff3f8b/torchcnnbuilder-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-15 17:10:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ChrisLisbon",
"github_project": "TorchCNNBuilder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "torch",
"specs": [
[
">=",
"2.0.0"
]
]
}
],
"lcname": "torchcnnbuilder"
}