Check first that the tensor is viewless (i.e., '._base' not set). If not,
raise an exception.
'''
assert_viewless_tensor(tensor,extra_msg="FYI, tensor._base has shape %s, and new_data_tensor has shape %s."%("--"iftensor._baseisNoneelsetensor._base.shape,new_data_tensor.shape))
tensor.data=new_data_tensor
classCudaRNGStatesTracker:
"""Tracker for the cuda RNG states.
...
...
@@ -242,8 +320,9 @@ class CheckpointFunction(torch.autograd.Function):