MCPcopy Create free account
hub / github.com/pytorch/pytorch / clone

Method clone

torch/storage.py:124–126  ·  view source on GitHub ↗

Return a copy of this storage.

(self)

Source from the content-addressed store, hash-verified

122 return super().__sizeof__() + self.size()
123
124 def clone(self):
125 """Return a copy of this storage."""
126 return type(self)(self.nbytes(), device=self.device).copy_(self)
127
128 def tolist(self):
129 """Return a list containing the elements of this storage."""

Callers 11

__copy__Method · 0.95
__deepcopy__Method · 0.95
cloneBatchedColumnMajorFunction · 0.45
_toMethod · 0.45
cloneMethod · 0.45
_toMethod · 0.45
_polynomial_valueFunction · 0.45
__init__Method · 0.45
_tensor_strFunction · 0.45
__deepcopy__Method · 0.45

Calls 2

nbytesMethod · 0.95
copy_Method · 0.45

Tested by

no test coverage detected