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

Method set_batch_size

bindsnet/network/nodes.py:1692–1701  ·  view source on GitHub ↗

Sets mini-batch size. Called when layer is added to a network. :param batch_size: Mini-batch size.

(self, batch_size)

Source from the content-addressed store, hash-verified

1690 ) # Neuron voltage decay (per timestep).
1691
1692 def set_batch_size(self, batch_size) -> None:
1693 # language=rst
1694 """
1695 Sets mini-batch size. Called when layer is added to a network.
1696
1697 :param batch_size: Mini-batch size.
1698 """
1699 super().set_batch_size(batch_size=batch_size)
1700 self.v = self.rest * torch.ones(batch_size, *self.shape, device=self.v.device)
1701 self.refrac_count = torch.zeros_like(self.v, device=self.refrac_count.device)

Callers

nothing calls this directly

Calls 1

set_batch_sizeMethod · 0.45

Tested by

no test coverage detected