Traktor/myenv/Lib/site-packages/torch/nn/parameter.pyi

41 lines
909 B
Python
Raw Normal View History

2024-05-26 05:12:46 +02:00
import builtins
from typing import Optional, Tuple
import torch
from torch import Tensor
class Parameter(Tensor):
def __init__(
self,
data: Tensor = ...,
requires_grad: builtins.bool = ...,
): ...
def is_lazy(param: Tensor): ...
class UninitializedParameter(Tensor):
def __init__(
self,
data: Tensor = ...,
requires_grad: builtins.bool = ...,
): ...
def materialize(
self,
shape: Tuple[int, ...],
device: Optional[torch.device] = None,
dtype: Optional[torch.dtype] = None,
): ...
class UninitializedBuffer(Tensor):
def __init__(
self,
data: Tensor = ...,
requires_grad: builtins.bool = ...,
): ...
def materialize(
self,
shape: Tuple[int, ...],
device: Optional[torch.device] = None,
dtype: Optional[torch.dtype] = None,
): ...