Example #1
0
 def data_loader(split_from, split_to, eval):
     if (params['dataset'] == "toy_sin_wave"):
         dataset = FolderDataset(toy_sin_wave=True)
     else:
         dataset = FolderDataset(path=path,
                                 overlap_len=overlap_len,
                                 q_levels=params['q_levels'],
                                 ratio_min=split_from,
                                 ratio_max=split_to)
     return DataLoader(dataset,
                       batch_size=params['batch_size'],
                       seq_len=params['seq_len'],
                       overlap_len=overlap_len,
                       shuffle=(not eval),
                       drop_last=(not eval))
    def data_loader(partition):
        dataset = FolderDataset(params['datasets_path'], path, cond_path, overlap_len, params['q_levels'],
                                params['ulaw'], params['seq_len'], params['batch_size'], params['cond_dim'],
                                params['cond_len'], params['norm_ind'], params['static_spk'],
                                params['look_ahead'], partition)

        return DataLoader(dataset, batch_size=params['batch_size'], shuffle=False, drop_last=True, num_workers=2)
Example #3
0
 def data_loader(split_from, split_to, eval):
     dataset = FolderDataset(path, overlap_len, params['q_levels'],
                             split_from, split_to)
     return DataLoader(dataset,
                       batch_size=params['batch_size'],
                       seq_len=params['seq_len'],
                       overlap_len=overlap_len,
                       shuffle=(not eval),
                       drop_last=(not eval))
 def data_loader(split_from, split_to, eval):
     dataset = FolderDataset(
         path, overlap_len, params['q_levels'], split_from, split_to
     )
     l = dataset.__len__()
     dataset_filenames = []
     for i in range(0, l):
         # print(dataset.get_filename(i))
         dataset_filenames.append(dataset.get_filename(i))
     dataloader = DataLoader(
         dataset,
         batch_size=params['batch_size'],
         seq_len=params['seq_len'],
         overlap_len=overlap_len,
         shuffle=(not eval),
         drop_last=(not eval)
     )
     return dataloader, dataset_filenames
Example #5
0
 def data_loader(split_from, split_to, eval):
     dataset = FolderDataset(path_wav, path_spec, params['hindsight'],
                                 params['q_levels'],
                                 split_from, split_to
                                 )
     return DataLoader(
     dataset,
     batch_size = params['batch_size'],
     seq_len = params['seq_len']
     hindsight = params['hindsight'],
     shuffle=(not eval),
     drop_last=(not eval)
 )