LazyLinear
-
class torch.nn.LazyLinear(out_features, bias=True, device=None, dtype=None)[source] -
A
torch.nn.Linearmodule wherein_featuresis inferred.In this module, the
weightandbiasare oftorch.nn.UninitializedParameterclass. They will be initialized after the first call toforwardis done and the module will become a regulartorch.nn.Linearmodule. Thein_featuresargument of theLinearis inferred from theinput.shape[-1].Check the
torch.nn.modules.lazy.LazyModuleMixinfor further documentation on lazy modules and their limitations.- Parameters
-
- out_features (int) – размер каждого выходного образца
-
bias (UninitializedParameter) – Если установлено в
False, слой не будет обучать аддитивное смещение. По умолчанию:True
- Variables
-
- weight (torch.nn.parameter.UninitializedParameter) – обучаемые веса модуля формы . Значения инициализируются из , где
-
bias (torch.nn.parameter.UninitializedParameter) – обучаемое смещение модуля формы . Если
biasравноTrue, значения инициализируются из где
-
cls_to_become -
псевдоним
Linear
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.LazyLinear.html