Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 502 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 502 Bytes

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