(self, dim, conn_cls, in_shape, out_shape, rule)
| 456 | @pytest.mark.parametrize("dim,conn_cls,in_shape,out_shape", _CONV_CASES) |
| 457 | @pytest.mark.parametrize("rule", [MSTDP, MSTDPET]) |
| 458 | def test_conv_learns(self, dim, conn_cls, in_shape, out_shape, rule): |
| 459 | torch.manual_seed(2) |
| 460 | T = 25 |
| 461 | pre = torch.bernoulli(torch.full((T, 1, *in_shape), 0.3)) |
| 462 | post = torch.bernoulli(torch.full((T, 1, *out_shape), 0.3)) |
| 463 | dW, _ = _drive_shaped( |
| 464 | _make_conv(conn_cls, in_shape, out_shape, rule, 1), pre, post |
| 465 | ) |
| 466 | assert dW.abs().sum().item() > 0.0 |
| 467 | |
| 468 | @pytest.mark.parametrize("dim,conn_cls,in_shape,out_shape", _CONV_CASES) |
| 469 | @pytest.mark.parametrize("rule", [MSTDP, MSTDPET]) |
nothing calls this directly
no test coverage detected