mmlearn.datasets.processors.masking.RandomMaskGenerator¶
- class RandomMaskGenerator(probability)[source]¶
Bases:
object
Random mask generator.
Returns a random mask of shape (nb_patches, nb_patches) based on the configuration where the number of patches to be masked is num_masking_patches. This is intended to be used for tasks like masked language modeling.
- Parameters:
probability (float) – Probability of masking a token.
Methods