Interfaces

Functionality

Core interface

First you need to define a custom LearningMethod (and possibly a Task).

Then implement the following functions by dispatching on the method.

Required functionsDescription
encodeEncodes a sample containing input and target so they can be used for a training step
encodeinputEncodes an input so that it can be fed to a model
encodetargetEncodes a target so that it can be compared to a model output using a loss function
decodeŷDecodes the output of a model into a target

Optional functionsDescription
shouldbatchDefines whether the model for a method should take batches of
encoded inputs. The default is true.