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

Method __init__

bindsnet/network/topology_features.py:725–750  ·  view source on GitHub ↗

Adds scalars to signals :param name: Name of the feature :param value: Values to scale signals by :param value_dtype: Data type for :code:`value` tensor :param sparse: Should :code:`value` parameter be sparse tensor or not :param batch_size: Mini-batc

(
        self,
        name: str,
        value: Union[torch.Tensor, float, int] = None,
        value_dtype: torch.dtype = torch.float32,
        range: Optional[Sequence[float]] = None,
        sparse: Optional[bool] = False,
        batch_size: int = 1,
    )

Source from the content-addressed store, hash-verified

723
724class Intensity(AbstractFeature):
725 def __init__(
726 self,
727 name: str,
728 value: Union[torch.Tensor, float, int] = None,
729 value_dtype: torch.dtype = torch.float32,
730 range: Optional[Sequence[float]] = None,
731 sparse: Optional[bool] = False,
732 batch_size: int = 1,
733 ) -> None:
734 # language=rst
735 """
736 Adds scalars to signals
737 :param name: Name of the feature
738 :param value: Values to scale signals by
739 :param value_dtype: Data type for :code:`value` tensor
740 :param sparse: Should :code:`value` parameter be sparse tensor or not
741 :param batch_size: Mini-batch size.
742 """
743 super().__init__(
744 name=name,
745 value=value,
746 value_dtype=value_dtype,
747 range=range,
748 sparse=sparse,
749 batch_size=batch_size,
750 )
751
752 def reset_state_variables(self) -> None:
753 pass

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected