INNER CODE UNIT · Python

main

dailenson/SDT · evaluate.py:9

def main(opt):
    if opt.metric == 'DTW':
        """ set dataloader"""
        test_dataset = Online_Dataset(opt.data_path)
        print('loading generated samples, the total amount of samples is', len(test_dataset))
        test_loader = torch.utils.data.DataLoader(test_dataset,
                                                batch_size=opt.batchsize,
                                                shuffle=True,
                                                sampler=None,
                                                drop_last=False,
                                                collate_fn=test_dataset.collate_fn_,
                                                num_workers=8)
        DTW = fast_norm_len_dtw(test_loader)
        print(f"the avg fast_norm_len_dtw is {DTW}")

    if opt.metric == 'Style_score':
        test_dataset = test_offline_Style_Dataset(opt.data_path,False)
        print('num testing images:', len(test_dataset))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…