SupervisedTask

struct defined in module FastAI


			SupervisedTask((inputblock, targetblock), encodings)

A AbstractBlockTask learning task for the supervised task of learning to predict a target given an input. encodings are applied to samples before being input to the model. Model outputs are decoded using those same encodings to get a target prediction.

In addition, to the blocks defined by AbstractBlockTask, getblocks(::SupervisedTask) defines the following blocks:

By default the model output is assumed to be an encoded target, but the ŷblock keyword argument to overwrite this.

  • blocks.input: An unencoded input and the first element in the tuple sample = (input, target)

  • blocks.target: An unencoded target and the second element in the tuple sample = (input, target)

  • blocks.pred: A prediction. Usually the same as blocks.target but may differ if a custom ŷblock is specified.

A SupervisedTask also enables some additional functionality: