Checkpointing: Avoid assigning tensor storage with different device (#4836)
On some back-ends, assigning tensor.data to a storage being on a
different
device than the tensor is not supported.
The fix is to save the storage in a temp data member and restore
tensor.data
when needed.
Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com>