ParameterLike#
- class penzai.nn.parameters.ParameterLike[source]#
-
Protocol for a parameter-like object.
ParameterLikedefines the common API for parameters inpenzai.nn. Any parameterized network layer should annotate its parameters asParameterLike, and should not make assumptions about the exact implementation ofParameterLikeused.ParameterLikeis a protocol, which means implementations of it do not have to explicitly subclass it. If you definevalueas a dataclass attribute rather than a property, you should avoid subclassingParameterLikedirectly, since Python’s ABC system will not see that as an implementation of the method.Methods
__init__(*args, **kwargs)Attributes
The value of the parameter.
- abstract property value: T#
The value of the parameter. May raise an error for some instances.