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
import plinear
import plinear.btnn as 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.0.tar.gz
(3.7 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
File details
Details for the file plinear-0.2.0.0.tar.gz.
File metadata
- Download URL: plinear-0.2.0.0.tar.gz
- Upload date:
- Size: 3.7 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 |
b72349207aa7ccd7e97545cff3c84ad83e6aa3832fe9dce18d5d557121a54219
|
|
| MD5 |
12156ffb6060e4488621203bd7ffda54
|
|
| BLAKE2b-256 |
39ed952b96968a5842f6a4227abf19ed60ad369fa0fc1cce9096c282d80417ba
|
File details
Details for the file plinear-0.2.0.0-py3-none-any.whl.
File metadata
- Download URL: plinear-0.2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 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 |
ca7273c7ddc720ba9250c4423d95d89f40590977b6e0d6ff4b73d55574f5c8f0
|
|
| MD5 |
8de283797424a3a95d039f1a03b14d26
|
|
| BLAKE2b-256 |
1a933a5e06e84d3cb117bafb0347d36a4339f1bd0a94c3b209b47a7be92e23d6
|