rime.util.score_array.LazyScoreBase
- class rime.util.score_array.LazyScoreBase(shape)[source]
Bases:
objectlow-rank, sparse, and other expressions with deferred evaluations after subsampling
Support expressions like (a @ b.T + c).exp() * d + e
Support operations T, __getitem__, collate_fn
Lazy evaluation until as_tensor(device) or numpy()
Drop support for reindex because it is nontrivial to find fill_values through activation.
Methods
__init__(shape)apply(op)as_tensor([device])collate_fn(D)collate by rows for pytorch dataloaders
exp()numpy()sigmoid()softplus()vae_module(module)Attributes
Tbatch_sizesize