Shortcuts

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 a dict, the result will be a list of dicts

  • if the batch is list-like, the result is guaranteed to be a list

Parameters

batch (Any) – The batch of outputs to be uncollated.

Return type

List[Any]

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.

Read the Docs v: stable
Versions
latest
stable
0.8.2
0.8.1.post0
0.8.1
0.8.0
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.5.2
0.5.1
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0post1
Downloads
html
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.