alterzero / DBPN-Pytorch

The project is an official implement of our CVPR2018 paper "Deep Back-Projection Networks for Super-Resolution" (Winner of NTIRE2018 and PIRM2018)
https://alterzero.github.io/projects/DBPN.html
MIT License
566 stars 164 forks source link

runtimeerror #36

Closed 363325971 closed 5 years ago

363325971 commented 5 years ago
    RuntimeError: 
    An attempt has been made to start a new process before the
    current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

I got this error when run python eval.py, I tried both in torch 1.0.0 and torch 0.3.1, the issue is in

    for batch in testing_data_loader:

which call

    testing_data_loader = DataLoader(dataset=test_set, num_workers=opt.threads, batch_size=opt.testBatchSize, shuffle=False)

again and again...

alterzero commented 5 years ago

Do you use Windows? it seems the problem is the PyTorch on Windows. Try the solution on the bottom of this page. https://pytorch.org/docs/stable/notes/windows.html#multiprocessing-error-without-if-clause-protection