flash.core.data.batch.default_uncollate¶
- flash.core.data.batch.default_uncollate(batch)[source]¶
This function is used to uncollate a batch into samples. The following conditions are used:
if the
batch
is adict
, the result will be a list of dictsif the
batch
is list-like, the result is guaranteed to be a list
- Parameters
- Return type
- Returns
The uncollated list of predictions.
- Raises
ValueError – If the input is a
dict
whose values are not all list-like.ValueError – If the input is a
dict
whose values are not all the same length.ValueError – If the input is not a
dict
or list-like.