MCPcopy Create free account
hub / github.com/BindsNET/bindsnet / test_init

Method test_init

test/models/test_models.py:33–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31
32class TestDiehlAndCook2015:
33 def test_init(self):
34 for n_inpt in [50, 100, 200]:
35 for n_neurons in [50, 100, 200]:
36 for dt in [1.0, 2.0]:
37 for exc in [13.3, 14.53]:
38 for inh in [10.5, 12.2]:
39 network = DiehlAndCook2015(
40 n_inpt=n_inpt,
41 n_neurons=n_neurons,
42 exc=exc,
43 inh=inh,
44 dt=dt,
45 )
46
47 assert network.n_inpt == n_inpt
48 assert network.n_neurons == n_neurons
49 assert network.dt == dt
50 assert network.exc == exc
51 assert network.inh == inh
52
53 assert (
54 isinstance(network.layers["X"], Input)
55 and network.layers["X"].n == n_inpt
56 )
57 assert (
58 isinstance(network.layers["Ae"], DiehlAndCookNodes)
59 and network.layers["Ae"].n == n_neurons
60 )
61 assert (
62 isinstance(network.layers["Ai"], LIFNodes)
63 and network.layers["Ae"].n == n_neurons
64 )
65
66 for conn in [("X", "Ae"), ("Ae", "Ai"), ("Ai", "Ae")]:
67 assert conn in network.connections

Callers

nothing calls this directly

Calls 1

DiehlAndCook2015Class · 0.90

Tested by

no test coverage detected