Views
No views yet
| Inputs | 5 (1 data + 4 select) |
| Outputs | 16 |
| Neurons | 16 |
| Layers | 1 |
| Parameters | 96 |
| Magnitude | 128 |
1from safetensors.torch import load_file
2import torch
3
4w = load_file('model.safetensors')
5
6def demux16(d, s3, s2, s1, s0):
7 inp = torch.tensor([float(d), float(s3), float(s2), float(s1), float(s0)])
8 return [int((inp * w[f'y{i}.weight']).sum() + w[f'y{i}.bias'] >= 0)
9 for i in range(16)]
10
11# Route d=1 to output 10 (s=1010)
12print(demux16(1, 1, 0, 1, 0)) # [0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0]