parallel neural network layer for binarization of ternarization - quantized layers from the beginning
Project description
plinear
Github for parrallel - linear layer
You can install PLinear using pip:
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
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
plinear-0.2.0.4.tar.gz
(6.0 kB
view details)
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
plinear-0.2.0.4-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file plinear-0.2.0.4.tar.gz.
File metadata
- Download URL: plinear-0.2.0.4.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c9b7ecb6fa4b71db2a2a2dda9605654b92783a177445f7cea2715c1a5ca99b5
|
|
| MD5 |
f700c3e6003810458e4273f9a8ab22d0
|
|
| BLAKE2b-256 |
cae4c18d445b46ca4efbc88c72e54bba8ca7f6d692ea1d6e4e4020b508b0642d
|
File details
Details for the file plinear-0.2.0.4-py3-none-any.whl.
File metadata
- Download URL: plinear-0.2.0.4-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
364adb2f04a6289a0c632283547505dc97c7561c0cca8b02a21745e6086bdb54
|
|
| MD5 |
85a02ce89fb43b40c3eb167cc3e403f1
|
|
| BLAKE2b-256 |
9d2b7130141fa4ea297deb777fc529c9eb394fcaf4c278a477b36e0d515d7035
|