Views
No views yet
| Model | Role | Authority |
|---|---|---|
domain_classifier.json | Compare movement/rotation/transform/hybrid hypotheses | Advisory |
action_predictor.json | Estimate whether a candidate action may succeed | Advisory |
captcha_classifier.json | Experimental CAPTCHA-family classification fixture | Research only; never a bypass mechanism |
1import json
2import numpy as np
3
4with open("domain_classifier.json", encoding="utf-8") as stream:
5 model = json.load(stream)
6
7x = np.asarray([1.0, 1.0, 0.3, 0.35, 0.45, 0.02], dtype=float)
8for index, (weights, bias, activation) in enumerate(zip(
9 model["weights"], model["biases"], model["activations"]
10)):
11 matrix = np.asarray(weights).reshape(model["layers"][index + 1], model["layers"][index])
12 x = x @ matrix.T + np.asarray(bias)
13 if activation == "relu":
14 x = np.maximum(0, x)
15 elif activation == "sigmoid":
16 x = 1 / (1 + np.exp(-x))
17 elif activation == "softmax":
18 shifted = x - np.max(x)
19 x = np.exp(shifted) / np.exp(shifted).sum()
20
21print(x)