DictModel#
- class liesel.goose.models.DictModel(log_prob_fn)[source]#
Bases:
objectA model interface for a model state represented by a
dict[str, Array]and a corresponding log-probability function.Methods
extract_position(position_keys, model_state)Extracts the position from the model state given a sequence of position keys.
log_prob(model_state)Computes the unnormalized log-probability given the model state.
update_state(position, model_state)Updates the model state with the values in the position.