riadd.aucmedi icon indicating copy to clipboard operation
riadd.aucmedi copied to clipboard

Error while executing the project- Threading error

Open Susheelabhat opened this issue 3 years ago • 2 comments

I tried executing the Detecter DenseNet file . But it gives a strange error. File "C:\Users\DELL\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle _thread.lock objects.

This happens when epoch 1 starts running Pasting a image here. snapshot

Susheelabhat avatar Apr 13 '22 03:04 Susheelabhat

Hello @Susheelabhat,

mhm, could it be that you are using Windows as OS?

The error log and this thread on stackoverflow suggests that this could be a Windows issue for using multiprocessing: https://stackoverflow.com/questions/44567402/python-cant-pickle-thread-lock-error-when-creating-a-thread-under-a-multipr

I would recommend to disable all multi-processing stuff. This will cost you training speed, but it should work then on your machine.

Parameter which have to be altered:

  • under configuration section, variable threads = 16 have to be changed to threads=1
  • In Neural_Network class initialization, the parameter multiprocessing=True have to be changed to multiprocessing=False

Cheers, Dominik

muellerdo avatar Apr 13 '22 12:04 muellerdo

Okay, yeah this worked. Thank you!

Susheelabhat avatar Apr 20 '22 12:04 Susheelabhat