Metadata-Version: 2.4
Name: creyone_layer
Version: 1.0.1
Summary: PyTorch layer building tools for CREYONE
Author-email: Linqa Kiriyama <kiriyamalq@gmail.com>
License: MIT License
        
        Copyright (c) 2026 QNiLix
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://example.com
Project-URL: Documentation, https://creyone-layer.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/qnilix/creyone_layer.git
Project-URL: Bug Tracker, https://github.com/qnilix/creyone_layer/issues
Project-URL: Changelog, https://github.com/qnilix/creyone_layer/blob/master/CHANGELOG.md
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0
Dynamic: license-file

# creyone_layer (Beta Package for CreYoNe)

Create Your Network (a.k.a. CreYoNe) is a utility tools for making DNN module via torch. This repository provides Layer-sized building blocks for deep learning.

## Installation

```bash
pip install creyone-layer
```

From source:

```bash
git clone https://github.com/qnilix/creyone_layer.git
cd creyone_layer
pip install -e .
```

## Quick Start

### Layer registry — `create_layer`

```python
from creyone_layer import create_layer

relu = create_layer('relu', 'act')(inplace=True)()
bn   = create_layer('batch', 'norm')(dim=2, eps=1e-5, mom=0.1)(64)
conv = create_layer('base',  'conv')(dim=2, optional='ap')(32, 64, 3)
pool = create_layer('max',   'pool')(dim=2, optional='ap')(2)
```

## Registered Layers

| Family | Names                                                                               |
| ------ | ----------------------------------------------------------------------------------- |
| `conv` | `base`, `depthwise`                                                                 |
| `norm` | `batch`, `layer`                                                                    |
| `act`  | `relu`, `relu6`, `gelu`, `quickgelu`, `sigmoid`, `hardsig`, `hardswish`, `swisheff` |
| `pool` | `max`, `avg`                                                                        |

### `conv` options (passed via `optional='...'`, `+`-separated)

| Flag   | Effect                                              |
| ------ | --------------------------------------------------- |
| `ap`   | auto-pad — output spatial size matches input        |
| `dw`   | depthwise — `groups = in_channels`                  |
| `grid` | stride = kernel size (grid-like sampling)           |
| `ar`   | AutoReshape — accepts `(B, H*W, C)` token sequences |
