UninitializedParameter(requires_grad=True, device=None, dtype=None)¶
A parameter that is not initialized.
Unitialized Parameters are a a special case of
torch.nn.Parameterwhere the shape of the data is still unknown.
torch.nn.Parameter, uninitialized parameters hold no data and attempting to access some properties, like their shape, will throw a runtime error. The only operations that can be performed on a uninitialized parameter are changing its datatype, moving it to a different device and converting it to a regular
The default device or dtype to use when the parameter is materialized can be set during construction using e.g.