It can be useful to define your ~flash.core.data.io.input_transform.InputTransform
in an input_transform.py
file. Here's an example from image/classification/input_transform.py:
../../../flash/image/classification/input_transform.py
We recommend that you do most of the heavy lifting in the ~flash.core.data.io.output_transform.OutputTransform
. Specifically, it should include any formatting and transforms that should always be applied to the predictions. If you want to support different use cases that require different prediction formats, you should add some ~flash.core.data.io.output.Output
implementations in an output.py
file.
Some good examples are in flash/core/classification.py. Here's the ~flash.core.classification.ClassesOutput
~flash.core.data.io.output.Output
:
../../../flash/core/classification.py
Alternatively, here's the ~flash.core.classification.LogitsOutput
~flash.core.data.io.output.Output
:
../../../flash/core/classification.py
Take a look at predictions
to learn more.
Once you've added any optional extras, it's time to create some examples showing your task in action! <contributing_examples>