Metadata-Version: 2.1
Name: plinear
Version: 0.2.0.3
Summary: parallel neural network layer for binarization of ternarization - quantized layers from the beginning
Home-page: https://github.com/Snow0821/plinear
License: MIT
Author: Choi Soon Ho
Author-email: sosaror@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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-Dist: numpy (>=1.21,<2.0)
Requires-Dist: torch (>=2.0.0)
Requires-Dist: torchvision (>=0.15.0)
Project-URL: Repository, https://github.com/Snow0821/plinear
Description-Content-Type: text/markdown

# plinear

Github for parrallel - linear layer

You can install PLinear using pip:

```sh
pip install plinear
```

#### Example usage

```
import torch
import torch.nn as nn
from plinear import btnn

class SimpleNN(nn.Module):
    def __init__(self):
        super(SimpleNN, self).__init__()
        self.fc1 = btnn.Linear(28*28, 128)
        self.fc2 = btnn.Linear(128, 10)

    def forward(self, x):
        x = torch.flatten(x, 1)
        x = self.fc1(x)
        x = self.fc2(x)
        return x
```
