Fatal Python error: deallocating None

I used nn.DataParallel but it depends on what you need.