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

Method train

bindsnet/network/network.py:481–491  ·  view source on GitHub ↗

Sets the node in training mode. :param mode: Turn training on or off. :return: ``self`` as specified in ``torch.nn.Module``.

(self, mode: bool = True)

Source from the content-addressed store, hash-verified

479 self.monitors[monitor].reset_state_variables()
480
481 def train(self, mode: bool = True) -> "torch.nn.Module":
482 # language=rst
483 """
484 Sets the node in training mode.
485
486 :param mode: Turn training on or off.
487
488 :return: ``self`` as specified in ``torch.nn.Module``.
489 """
490 self.learning = mode
491 return super().train(mode)

Callers 3

__init__Method · 0.95
add_layerMethod · 0.45
add_connectionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected