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
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


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.1.tar.gz (4.0 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.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plinear-0.2.0.1.tar.gz
  • Upload date:
  • Size: 4.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

Hashes for plinear-0.2.0.1.tar.gz
Algorithm Hash digest
SHA256 79774a98318e61fd3ed1c176dbbfcff3ffb33da50bb1d813ab53f93d62739842
MD5 ad86e13ac6dc3c48827901ffb2571d3b
BLAKE2b-256 4a7429d59717635c0dc2ddbf4d444a0beb0b0da8822657320ee45e36b3c23fb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plinear-0.2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 059fd148787bf6ffbed545cfb51289cfd83309772eea2f15ccf6cb0ff8c00ac4
MD5 dd5ebaadfa3314188c1efea91b1bd771
BLAKE2b-256 2815efd3249a0990480e8208b51a37ea7432ec449fad4b3345c65312cc96ece4

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