(self)
| 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 | ) |
nothing calls this directly
no test coverage detected