Type Definitions

Sometimes HeteroSymNN uses type definitions in type hints. This section explains what they represent.

class HeteroSymNN.types.BackendArray[source]

BackendArray represents an array type used in the backend computations, can be either a NumPy array or a CuPy array depending on the hardware backend.

class HeteroSymNN.types.ConstantToUpdate[source]

ConstantToUpdate represents a tuple containing the node index, the constant name, and the new value. Definition: tuple[int, str, float]

HeteroSymNN.types.FlexibleNodeConfig

FlexibleNodeConfig can be either a simple string representing the activation function name or a detailed NodeConfig tuple.

alias of str | NodeConfig

class HeteroSymNN.types.LayerConstructionConfig[source]

LayerConstructionConfig encapsulates the configuration needed to construct a neural network layer, including a list of NodeConfig for each node and the corresponding LayerValues. Definition: tuple[list[NodeConfig], LayerValues]

class HeteroSymNN.types.LayerValues[source]

LayerValues represents the parameters of a neural network layer, including biases, weights, and connection masks in that order. Definition: tuple[list[float], list[list[float]], list[list[float]]]

class HeteroSymNN.types.NodeConfig[source]

NodeConfig reprecents the activation function and its custom constants in the function. Definition: tuple[str, dict[str, float]]