MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / AutoScalingTensor

Class AutoScalingTensor

Utility/Extensions/TensorExtension.py:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 # this version visible to type hinting actually matches all valid usages of the AutoScalingTensor
43 # so there is no significant discrepency between static analysis bahavior and actual runtime result.
44 class AutoScalingTensor(torch.Tensor):
45 def __init__(self,
46 shape: torch.Size | Sequence[int] | None,
47 grow_on: int,
48 init_tensor: torch.Tensor | None = None,
49 init_val: int | float | None = None,
50 **kwargs) -> None: ...
51 def __new__(cls, *args, **kwargs) -> "AutoScalingTensor": ...
52 def push(self, x: torch.Tensor) -> None: ...
53 @property
54 def current_size(self) -> int: ...
55 @property
56 def _curr_max_size(self) -> int: ...
57 @property
58 def tensor(self) -> torch.Tensor: ...
59else:
60 class AutoScalingTensor:
61 def __init__(self,

Callers 7

__init__Method · 0.90
deserializeMethod · 0.90
__init__Method · 0.90
deserializeMethod · 0.90
__init__Method · 0.90
deserializeMethod · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected