Utility Functions

Utility Functions#

General-purpose utilities for neural network operations. count_parameters tallies trainable and total parameters in a model, while clip_grad_norm implements gradient clipping for training stability. HiData provides utilities for organizing and accessing hierarchical, tree-structured data for compositional models.

count_parameters

Count and display the number of trainable parameters in a neural network model.

clip_grad_norm

Clip gradient norm of a PyTree of parameters.

HiData

Hierarchical state container for composed dynamics.