parameter.pyi 749 B

1234567891011121314151617181920212223
  1. import torch
  2. from .. import Tensor
  3. from typing import Tuple, Optional
  4. import builtins
  5. class Parameter(Tensor):
  6. def __init__(self, data: Tensor=..., requires_grad: builtins.bool=...): ...
  7. ...
  8. def is_lazy(param: Tensor): ...
  9. class UninitializedParameter(Tensor):
  10. def __init__(self, data: Tensor=..., requires_grad: builtins.bool=...): ...
  11. def materialize(self, shape: Tuple[int, ...], device: Optional[torch.device] = None, dtype: Optional[torch.dtype] = None): ...
  12. ...
  13. class UninitializedBuffer(Tensor):
  14. def __init__(self, data: Tensor=..., requires_grad: builtins.bool=...): ...
  15. def materialize(self, shape: Tuple[int, ...], device: Optional[torch.device] = None, dtype: Optional[torch.dtype] = None): ...
  16. ...