コード例 #1
0
 def configure_data_loaders(self, data_config, loaders_config,
                            is_distributed, seed):
     """
     Set up data loaders from loaders config
     """
     for name, loader_config in loaders_config.items():
         self.data_loaders[name] = get_data_loader(
             **data_config,
             **loader_config,
             is_distributed=is_distributed,
             seed=seed)
コード例 #2
0
    def configure_data_loaders(self, data_config, loaders_config, is_distributed, seed):
        """
        Set up data loaders from loaders config

        Args:
            data_config     ... hydra config specifying dataset
            loaders_config  ... hydra config specifying dataloaders
            is_distributed  ... boolean indicating if running in multiprocessing mode
            seed            ... seed to use to initialize dataloaders
        
        Parameters:
            self should have dict attribute data_loaders
        """
        for name, loader_config in loaders_config.items():
            self.data_loaders[name] = get_data_loader(**data_config, **loader_config, is_distributed=is_distributed, seed=seed)