Fixed the issue, it wasn’t a Pytorch problem. I needed to allocate more stack space via the threading package: https://stackoverflow.com/questions/20629027/process-finished-with-exit-code-1073741571 12