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

Method set_batch_size

bindsnet/network/nodes.py:969–978  ·  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

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
981class DiehlAndCookNodes(Nodes):

Callers

nothing calls this directly

Calls 1

set_batch_sizeMethod · 0.45

Tested by

no test coverage detected