Shortcuts

OutputTransform

class flash.core.data.io.output_transform.OutputTransform[source]

The OutputTransform encapsulates all the data processing logic that should run after the model.

static per_batch_transform(batch)[source]

Transforms to apply on a whole batch before uncollation to individual samples.

Can involve both CPU and Device transforms as this is not applied in separate workers.

Return type

Any

static per_sample_transform(sample)[source]

Transforms to apply to a single sample after splitting up the batch.

Can involve both CPU and Device transforms as this is not applied in separate workers.

Return type

Any

static uncollate(batch)[source]

Uncollates a batch into single samples.

Tries to preserve the type wherever possible.

Return type

Any