pyanomaly/datatools/datatools_api.py
def _build_sampler(self, _data_len):
        """
        The method is used to build the sampler based on the length of the dataset
        Args:
            _data_len: The length of the dataset
        Returns:
            sampler: torch.data.Sampler
        """
        if self.cfg.SYSTEM.distributed.use:
            sampler = DistTrainSampler(_data_len)
        else:
            sampler = TrainSampler(_data_len, self.seed)
        return sampler

        The method is used to build the sampler based on the length of the dataset
        Args:
            _data_len: The length of the dataset
        Returns:
            sampler: torch.data.Sampler
        
The method is used to build the sampler based on the length of the dataset
The method is used to build the sampler based on the length of the dataset
def _build_sampler(self, _data_len):
        if self.cfg.SYSTEM.distributed.use:
            sampler = DistTrainSampler(_data_len)
        else:
            sampler = TrainSampler(_data_len, self.seed)
        return sampler
def _build_sampler ( self , _data_len ) : if self . cfg . SYSTEM . distributed . use : sampler = DistTrainSampler ( _data_len ) else : sampler = TrainSampler ( _data_len , self . seed ) return sampler
The method is used to build the sampler based on the length of the dataset
The method is used to build the sampler based on the length of the dataset
"""
        The method is used to build the sampler based on the length of the dataset
        Args:
            _data_len: The length of the dataset
        Returns:
            sampler: torch.data.Sampler
        """
None
sampler
self
_data_len
The length of the dataset
The length of the dataset