MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _rebuild_tensor_v2

Function _rebuild_tensor_v2

PATH/core/utils.py:26–30  ·  view source on GitHub ↗
(storage, storage_offset, size, stride, requires_grad, backward_hooks)

Source from the content-addressed store, hash-verified

24 torch._utils._rebuild_tensor_v2
25except AttributeError:
26 def _rebuild_tensor_v2(storage, storage_offset, size, stride, requires_grad, backward_hooks):
27 tensor = torch._utils._rebuild_tensor(storage, storage_offset, size, stride)
28 tensor.requires_grad = requires_grad
29 tensor._backward_hooks = backward_hooks
30 return tensor
31 torch._utils._rebuild_tensor_v2 = _rebuild_tensor_v2
32
33import torch.nn as nn

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected