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)
Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
102 params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support