phanerozoic / threshold-xnor

huggingface.co
Total runs: 9
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: January 23 2026

Introduction of threshold-xnor

Model Details of threshold-xnor

threshold-xnor

The equality detector. Fires when both inputs match - both 0 or both 1. Like XOR, this function is not linearly separable and requires two layers.

Circuit
      x       y
      │       │
      ├───┬───┤
      │   │   │
      ▼   │   ▼
  ┌──────┐│┌──────┐
  │ NOR  │││ AND  │   Layer 1
  │w:-1,-1││w:1,1 │
  │b: 0  │││b: -2 │
  └──────┘│└──────┘
      │   │   │
      └───┼───┘
          ▼
      ┌──────┐
      │  OR  │         Layer 2
      │w: 1,1│
      │b: -1 │
      └──────┘
          │
          ▼
      XNOR(x,y)
Mechanism

XNOR catches equality via two cases:

  • NOR fires when both inputs are 0 (both quiet)
  • AND fires when both inputs are 1 (both active)
  • OR combines: at least one case holds
x y NOR AND OR(NOR,AND)
0 0 1 0 1
0 1 0 0 0
1 0 0 0 0
1 1 0 1 1

XNOR = NOT(XOR). Same non-linear structure, opposite meaning.

Parameters
Layer Weights Bias
NOR [-1, -1] 0
AND [1, 1] -2
OR [1, 1] -1
Total 9
Properties
  • Commutative: XNOR(x,y) = XNOR(y,x)
  • Reflexive: XNOR(x,x) = 1
  • Equality: x = y iff XNOR(x,y) = 1
Usage
from safetensors.torch import load_file
import torch

w = load_file('model.safetensors')

def xnor_gate(x, y):
    inp = torch.tensor([float(x), float(y)])

    nor_out = int((inp * w['layer1.neuron1.weight']).sum() + w['layer1.neuron1.bias'] >= 0)
    and_out = int((inp * w['layer1.neuron2.weight']).sum() + w['layer1.neuron2.bias'] >= 0)

    l1 = torch.tensor([float(nor_out), float(and_out)])
    return int((l1 * w['layer2.weight']).sum() + w['layer2.bias'] >= 0)
Files
threshold-xnor/
├── model.safetensors
├── model.py
├── config.json
└── README.md
License

MIT

Runs of phanerozoic threshold-xnor on huggingface.co

9
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About threshold-xnor huggingface.co Model

More threshold-xnor license Visit here:

https://choosealicense.com/licenses/mit

threshold-xnor huggingface.co

threshold-xnor huggingface.co is an AI model on huggingface.co that provides threshold-xnor's model effect (), which can be used instantly with this phanerozoic threshold-xnor model. huggingface.co supports a free trial of the threshold-xnor model, and also provides paid use of the threshold-xnor. Support call threshold-xnor model through api, including Node.js, Python, http.

phanerozoic threshold-xnor online free

threshold-xnor huggingface.co is an online trial and call api platform, which integrates threshold-xnor's modeling effects, including api services, and provides a free online trial of threshold-xnor, you can try threshold-xnor online for free by clicking the link below.

phanerozoic threshold-xnor online free url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-xnor

threshold-xnor install

threshold-xnor is an open source model from GitHub that offers a free installation service, and any user can find threshold-xnor on GitHub to install. At the same time, huggingface.co provides the effect of threshold-xnor install, users can directly use threshold-xnor installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

threshold-xnor install url in huggingface.co:

https://huggingface.co/phanerozoic/threshold-xnor

Url of threshold-xnor

threshold-xnor huggingface.co Url

Provider of threshold-xnor huggingface.co

phanerozoic
ORGANIZATIONS

Other API from phanerozoic

huggingface.co

Total runs: 89
Run Growth: 39
Growth Rate: 43.82%
Updated:September 26 2026