2a74e12fec206dd222f98cd3ac2a15c48ebdf0a9,data/prepare_train_data.py,,main,#,59

Before Change


        for scene in tqdm(data_loader.scenes):
            dump_example(args, scene)
    else:
        Parallel(n_jobs=args.num_threads)(delayed(dump_example)(args, scene) for scene in tqdm(data_loader.scenes))

    print("Generating train val lists")
    np.random.seed(8964)
    // to avoid data snooping, we will make two cameras of the same scene to fall in the same set, train or val

After Change


                                        img_height=args.height,
                                        img_width=args.width)

    n_scenes = len(data_loader.scenes)
    print("Found {} potential scenes".format(n_scenes))
    print("Retrieving frames")
    if args.num_threads == 1:
        for scene in tqdm(data_loader.scenes):
            dump_example(args, scene)
    else:
        with ProcessPool(max_workers=args.num_threads) as pool:
            tasks = pool.map(dump_example, [args]*n_scenes, data_loader.scenes)
            try:
                for _ in tqdm(tasks.result(), total=n_scenes):
                    pass
            except KeyboardInterrupt as e:
                tasks.cancel()
                raise e
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: ClementPinard/SfmLearner-Pytorch
Commit Name: 2a74e12fec206dd222f98cd3ac2a15c48ebdf0a9
Time: 2019-02-18
Author: clement.pinard@parrot.com
File Name: data/prepare_train_data.py
Class Name:
Method Name: main


Project Name: nilearn/nilearn
Commit Name: 3daedc17ddab948752f3d6b90e56b177ea77ec42
Time: 2014-02-26
Author: virgile.fritsch@gmail.com
File Name: nilearn/mass_univariate/permuted_least_squares.py
Class Name:
Method Name: permuted_ols


Project Name: Alexander-H-Liu/End-to-end-ASR-Pytorch
Commit Name: db06038d90d4af330086c6c95f0249bad865f73c
Time: 2019-08-20
Author: alexliu36@gmail.com
File Name: corpus/librispeech.py
Class Name: LibriTextDataset
Method Name: __init__