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,
)
| 723 | |
| 724 | class 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 |