Sets mini-batch size. Called when layer is added to a network. :param batch_size: Mini-batch size.
(self, batch_size)
| 295 | super().reset_state_variables() |
| 296 | |
| 297 | def set_batch_size(self, batch_size) -> None: |
| 298 | # language=rst |
| 299 | """ |
| 300 | Sets mini-batch size. Called when layer is added to a network. |
| 301 | |
| 302 | :param batch_size: Mini-batch size. |
| 303 | """ |
| 304 | super().set_batch_size(batch_size=batch_size) |
| 305 | self.v = torch.zeros(batch_size, *self.shape, device=self.v.device) |
| 306 | |
| 307 | |
| 308 | class IFNodes(Nodes): |
nothing calls this directly
no test coverage detected