DMPR-PS
DMPR-PS copied to clipboard
Exception in train.py - Can't pickle local object 'train_detector.<locals>.<lambda>
Hello @Teoge, first of all, thank you for sharing your research together with your code here!
I tried to execute your code and the inference ran flawlessly. Unfortunately, the training is not running due to the following error at location https://github.com/Teoge/DMPR-PS/blob/88b77e3c3c7e3c14b58db29e4810bc586d0a6896/train.py#L73-L79
Exception has occurred: AttributeError Can't pickle local object 'train_detector.<locals>.<lambda>'
This issue is seems to be a result of the lambda function being called in the DataLoader.
I executed your code with python 3.7.0 and torch 1.7.0.
I would appreciate any hint you have for me :)
Best, Johannes
Did you run your training on windows? It looks similar to this issue.
You can try the solutions inside, replacing lambda with a normally defined function, or setting num_workers to 0.