Bug found.
It seems that there are conflict with the DataParallel.
If I run the code on a CPU on a single GPU it works.
When I try to go parallel on multiple GPUs it raises the error I reported previously.
I doubled checked and my guess was right. It seems the issue is related to the type returned in the code I showed you.
This means that if I simply return result as a list it works (with DataParallel on multiple GPUs) whereas when I return a tuple through the named tuple method it breaks.
Nonetheless to return a list it not that nice, I would like to keep returning the namedtuple object. Any clue on how I could overcome the issue?