title: Is there a way to convert a python dictionary with some values on GPU memory to have everything on main memory?
body: <p>I have a Deep Learning (Using PyTorch) model whose output is given in dictionary format. The dictionary has multiple arrays as values and all these arrays are on GPU memory (torch.tensors with device = 'cuda'). Is there any way to move every array in the dictionary to main memory in one go?</p>
  <p>My current way of going about this is to write a loop and re-write the GPU arrays into variables and use those, but that seems quite ineffecient. My essential goal is to further process the outputs in a multi-threaded manner, but since these arrays are on GPU memory mutliple threads cannot access them at once.</p>
  <p>Would appreciate any sort of help or suggestions for this!</p>