netket.utils.struct.field#
- netket.utils.struct.field(pytree_node=True, serialize=True, cache=False, **kwargs)[source]#
Mark a field of a dataclass or PyTree to be:
- Parameters:
pytree_node – a leaf node in the pytree representation of this dataclass. If False this must be hashable
serialize – If True the node is included in the serialization. In general you should not specify this.
cache – If True this node is a cache and will be reset every time fields are modified.