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

Method set_batch_size

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

1133 ) # Adaptive threshold decay (per timestep).
1134
1135 def set_batch_size(self, batch_size) -> None:
1136 # language=rst
1137 """
1138 Sets mini-batch size. Called when layer is added to a network.
1139
1140 :param batch_size: Mini-batch size.
1141 """
1142 super().set_batch_size(batch_size=batch_size)
1143 self.v = self.rest * torch.ones(batch_size, *self.shape, device=self.v.device)
1144 self.refrac_count = torch.zeros_like(self.v, device=self.refrac_count.device)
1145
1146
1147class IzhikevichNodes(Nodes):

Callers

nothing calls this directly

Calls 1

set_batch_sizeMethod · 0.45

Tested by

no test coverage detected