How should I choose whether to use get_x
vs item_tfms
? In the examples for image classification, Resize
is passed via item_tfms
:
db = DataBlock(
blocks = (ImageBlock, CategoryBlock),
get_items = get_image_files,
get_y = get_label,
item_tfms = Resize(224)
)
It seems that passing it via get_x
also works:
birds = DataBlock(
blocks = (ImageBlock, CategoryBlock),
get_items = get_image_files,
get_x = Resize(224),
get_y = get_label
)
I see that the transforms will be applied at different stages but what’s the practical difference between these approaches? When should I transform my inputs with get_x
and when should I use item_tfms
?