Sets mini-batch size. Called when layer is added to a network. :param batch_size: Mini-batch size.
(self, batch_size)
| 967 | ) # Adaptive threshold decay (per timestep). |
| 968 | |
| 969 | def set_batch_size(self, batch_size) -> None: |
| 970 | # language=rst |
| 971 | """ |
| 972 | Sets mini-batch size. Called when layer is added to a network. |
| 973 | |
| 974 | :param batch_size: Mini-batch size. |
| 975 | """ |
| 976 | super().set_batch_size(batch_size=batch_size) |
| 977 | self.v = self.rest * torch.ones(batch_size, *self.shape, device=self.v.device) |
| 978 | self.refrac_count = torch.zeros_like(self.v, device=self.refrac_count.device) |
| 979 | |
| 980 | |
| 981 | class DiehlAndCookNodes(Nodes): |
nothing calls this directly
no test coverage detected