logic-gate
yes 102 parameters, not million, not thousand, one hundred and two. its the most useless and weirdest neural network, but can be ok for testing out stuff.
Details
Tiny 12 β 4 β 4 β 4 β 2 network that simulates 10 logic gates from one set of weights.
Input is a one-hot gate selector plus a and b. Output is 2 neurons.
Use
pip install torch safetensors
python example.py
from example import forward
print(forward("XOR", 1, 0).tolist()) # [p(out1), p(out2)]
print(forward("CNOT", 1, 0).tolist()) # [p(a), p(a XOR b)]
Gates: AND OR XOR NAND NOR XNOR NOT BUF CNOT SWAP
- One-output gates:
[result, 1 - result] CNOT(a, b) = (a, a XOR b)SWAP(a, b) = (b, a)
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support