braindecode.modules.StdLayer#

braindecode.modules.StdLayer = functools.partial(<class 'braindecode.modules.stats.StatLayer'>, <built-in method std of type object>)[source]#

Generic layer to compute a statistical function along a specified dimension. :param stat_fn: A function like torch.mean, torch.std, etc. :type stat_fn: Callable :param dim: Dimension along which to apply the function. :type dim: int :param keepdim: Whether to keep the reduced dimension. :type keepdim: bool, default=True :param clamp_range: Used only for functions requiring clamping (e.g., log variance). :type clamp_range: tuple(float, float), optional :param apply_log: Whether to apply log after computation (used for LogVarLayer). :type apply_log: bool, default=False