标签:storage stride erro uil hook import ram module UNC
import torch._utils
try:
torch._utils._rebuild_tensor_v2
except AttributeError:
def _rebuild_tensor_v2(storage, storage_offset, size, stride, requires_grad, backward_hooks):
tensor = torch._utils._rebuild_tensor(storage, storage_offset, size, stride)
tensor.requires_grad = requires_grad
tensor._backward_hooks = backward_hooks
return tensor
torch._utils._rebuild_tensor_v2 = _rebuild_tensor_v2
error: ‘module’ object has no attribute ‘_rebuild_tensor_v2’
标签:storage stride erro uil hook import ram module UNC
原文地址:https://www.cnblogs.com/huhuai/p/9489920.html