add_prediction
code_loader.leap_binder.add_prediction
The purpose of the leap_binder.add_prediction
function is to describe the prediction(s) tensors for visualization and analysis purposes. This function adds a prediction type, which later can be assigned to the model graph prediction node(s).
code_loader.leap_binder.add_prediction(
name=str,
labels=List[str]
channel_dim: int = -1
)
Args
name
(str) with the given name of the input, e.g. image
labels
(List[str]) an array containing the labels associated with this prediction
channel_dim
(defaults to -1). The dimension in which the channels exists in the prediction. channel_dim should be set to 1 for channel first predictions (i.e. - C,H,W).
Examples
Basic Usage
...
LABELS = ['0','1','2','3','4','5','6','7','8','9']
leap_binder.add_prediction(
name='predicted_digit',
labels=LABELS
)
Full script usage can be found at Integration Script.
Guides
Full examples can be found at the Dataset Integration section of the following guides:
Last updated
Was this helpful?