def get_augmentation_params(self, *batch):
        """Return transform parameters.

        Parameters
        ----------
        X : tensor.Tensor
            The data.
        y : tensor.Tensor
            The labels.

        Returns
        -------
        params : dict
            Contains two elements:

            * mask_start_per_sample : torch.tensor
                Tensor of integers containing the position (in last dimension)
                where to start masking the signal. Should have the same size as
                the first dimension of X (i.e. one start position per example
                in the batch).
            * mask_len_samples : int
                Number of consecutive samples to zero out.
        """
        if len(batch) == 0:
            return super().get_augmentation_params(*batch)
        X = batch[0]

        seq_length = torch.as_tensor(X.shape[-1], device=X.device)
        mask_len_samples = self.mask_len_samples
        if isinstance(mask_len_samples, torch.Tensor):
            mask_len_samples = mask_len_samples.to(X.device)
        mask_start = torch.as_tensor(
            self.rng.uniform(
                low=0,
                high=1,
                size=X.shape[0],
            ),
            device=X.device,
        ) * (seq_length - mask_len_samples)
        return {
            "mask_start_per_sample": mask_start,
            "mask_len_samples": mask_len_samples,
        }
Return transform parameters.

        Parameters
        ----------
        X : tensor.Tensor
            The data.
        y : tensor.Tensor
            The labels.

        Returns
        -------
        params : dict
            Contains two elements:

            * mask_start_per_sample : torch.tensor
                Tensor of integers containing the position (in last dimension)
                where to start masking the signal. Should have the same size as
                the first dimension of X (i.e. one start position per example
                in the batch).
            * mask_len_samples : int
                Number of consecutive samples to zero out.
        
braindecode/augmentation/transforms.py