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

Method test_rmax

test/network/test_learning.py:251–270  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

249 )
250
251 def test_rmax(self):
252 # Connection test
253 network = Network(dt=1.0)
254 network.add_layer(Input(n=100, traces=True, traces_additive=True), name="input")
255 network.add_layer(SRM0Nodes(n=100), name="output")
256 network.add_connection(
257 Connection(
258 source=network.layers["input"],
259 target=network.layers["output"],
260 nu=1e-2,
261 update_rule=Rmax,
262 ),
263 source="input",
264 target="output",
265 )
266 network.run(
267 inputs={"input": torch.bernoulli(torch.rand(250, 100)).byte()},
268 time=250,
269 reward=1.0,
270 )

Callers

nothing calls this directly

Calls 7

add_layerMethod · 0.95
add_connectionMethod · 0.95
runMethod · 0.95
NetworkClass · 0.90
InputClass · 0.90
SRM0NodesClass · 0.90
ConnectionClass · 0.90

Tested by

no test coverage detected