- netket.utils.struct.field(pytree_node=True, serialize=True, cache=False, **kwargs)#
Mark a field of a dataclass or PyTree to be:
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.