b58d873bc4344117bf8a2b42651e9acb5aeddb4e,predict.py,,main,#,30

Before Change


    dataloader_test = get_dataloader(opts)
    
    path_intermediate_dir = os.path.join(opts.path_save_dir, os.path.basename(opts.path_model_dir))
    if not os.path.exists(path_intermediate_dir):
        os.makedirs(path_intermediate_dir)
    with open(os.path.join(path_intermediate_dir, "predict_options.json"), "w") as fo:
        json.dump(vars(opts), fo, indent=4, sort_keys=True)
        
    for i, (signal, target) in enumerate(dataloader_test):

After Change


    model = fnet.load_model_from_dir(opts.path_model_dir, opts.gpu_ids)
    print(model)
    dataloader = get_dataloader(opts)
    entries = []
    for i, (signal, target) in enumerate(dataloader):
        prediction = model.predict(signal)
        path_tiff_dir = os.path.join(opts.path_save_dir, "{:02d}".format(i))
        if not os.path.exists(path_tiff_dir):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: AllenCellModeling/pytorch_fnet
Commit Name: b58d873bc4344117bf8a2b42651e9acb5aeddb4e
Time: 2018-01-22
Author: chek.o@outlook.com
File Name: predict.py
Class Name:
Method Name: main


Project Name: philipperemy/keras-tcn
Commit Name: 0cfe82c6beb9a28a5ff7da81b86fa0e93c388f14
Time: 2019-11-20
Author: premy@cogent.co.jp
File Name: tasks/save_reload_model.py
Class Name:
Method Name:


Project Name: kubeflow/kubeflow
Commit Name: 99c94d88c96c2b0a45bbbef4c8a126fa018ce513
Time: 2018-10-11
Author: 37601826+kunmingg@users.noreply.github.com
File Name: bootstrap/build.py
Class Name:
Method Name: main