Shortcuts

flash.core.data.utilities.collate.wrap_collate

flash.core.data.utilities.collate.wrap_collate(collate)[source]

flash.data.utilities.collate.wrap_collate() is a utility that can be used to wrap an existing collate function to handle the metadata separately from the rest of the batch (giving a list of the metadata from the samples in the output).

Parameters

collate – The collate function to wrap.

Returns

The wrapped collate function.