matchzoo.preprocessors.units.stateful_unit

Module Contents

Classes

StatefulUnit

Unit with inner state.

class matchzoo.preprocessors.units.stateful_unit.StatefulUnit

Bases: matchzoo.preprocessors.units.unit.Unit

Unit with inner state.

Usually need to be fit before transforming. All information gathered in the fit phrase will be stored into its context.

property state(self)

Get current context. Same as unit.context.

Deprecated since v2.2.0, and will be removed in the future. Used unit.context instead.

property context(self)

Get current context. Same as unit.state.

abstract fit(self, input_: typing.Any)

Abstract base method, need to be implemented in subclass.