norse.torch.utils.pytree

norse.torch.utils.pytree#

Functions

broadcast_input(potential_scalar, template)

map_only(ty)

Returns a function that allows mapping on a certain type.

register_tuple(typ)

tree_map_only(ty, fn, pytree)

Maps a pytree of a certain type with a given function

Classes

MultipleInheritanceNamedTupleMeta(typename, ...)

A meta class to instantiate and register named tuples

StateTuple()

A base class for state-tuples that allow operations like cuda, to, int, etc.