Core#

Base model#

BaseTM(config, device_config)

Configuration#

config.BaseTMConfig()

Settings shared by all TM models.

config.Feedback(*values)

Feedback codes shared by the C side and the python side.

device_config.DeviceConfig()

Where and how a model runs.

TA initializers#

TAInit()

Base class for TA initializers, passed as ta_init to a model.

ConstTAInit(state)

Set every TA to the same state.

UniformTAInit([low, high])

Draw every TA state uniformly from [low, high).

SampleTAInit(X[, Y, margin, p, include_position])

Start each clause as a copy of a training sample.

Clause inspection#

ClauseInfo()

Clauses returned by BaseTM.get_clauses().

Helpers#

config.enum_to_header(prefix, enum_cls)

device_config.parse_device(device)

Parse a device string into its kind and number.

device_config.split_device_kwargs(opt)

Split a kwargs dict into the model config fields and the DeviceConfig fields.