I suspect this closed issue is not fully fixed.
For the problem described in this thread, memory mapping issue is resolved by importing torch in the end (after scipy).
(DataParallel still has memory leak, maybe I should open another thread to discuss that?)