xlstm_jax.models.xlstm_pytorch.components.util#

Classes#

ParameterProxy

This class helps keeping parameters in a specialized internal structure to be optimal for computation speed, while

Functions#

round_to_multiple(n[, m])

conditional_decorator(condition, decorator)

A higher-order decorator that applies 'decorator' only if 'condition' is True.

Module Contents#

xlstm_jax.models.xlstm_pytorch.components.util.round_to_multiple(n, m=8)#
xlstm_jax.models.xlstm_pytorch.components.util.conditional_decorator(condition, decorator)#

A higher-order decorator that applies ‘decorator’ only if ‘condition’ is True.

class xlstm_jax.models.xlstm_pytorch.components.util.ParameterProxy(module, parameter_name, internal_to_external, external_to_internal)#

This class helps keeping parameters in a specialized internal structure to be optimal for computation speed, while having a proxied version to be called externally that is backend-agnostic.

It takes a module and a parameter name of a parameter in that module it represents. Via __setitem__ and __getitem__ the “external”

Parameters:
module#
parameter_name#
internal_to_external#
external_to_internal#
clone()#
property shape#
property ndim#
property grad#