Skip to main content

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


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.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plinear-0.2.0.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file plinear-0.2.0.3.tar.gz.

File metadata

  • Download URL: plinear-0.2.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/23.6.0

File hashes

Hashes for plinear-0.2.0.3.tar.gz
Algorithm Hash digest
SHA256 59710bfe5011d42a5b4075f37e90db0d42eb6ee3be8d7ff5de9c7c017114789a
MD5 caf3950765b8ebd83b90ad9599bd4cc5
BLAKE2b-256 672e9caea44362344561ce4bcf2091bde4d4377df03020ac475db0fac5826e41

See more details on using hashes here.

File details

Details for the file plinear-0.2.0.3-py3-none-any.whl.

File metadata

  • Download URL: plinear-0.2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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

Hashes for plinear-0.2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a67bc956640cc6b56c28f03dfec531e00b3380e7d913d6a9491942d64aa9791
MD5 51bc9f902fcfd7cb2c5ab28c86e1564b
BLAKE2b-256 9050a3899ab4d97be93083ac35ec2524c13a22aa439a3209f2d303737a7f787f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page