Table Of Contents
Table Of Contents

check_label_shapes

mxnet.metric.check_label_shapes(labels, preds, wrap=False, shape=False)[source]

Helper function for checking shape of label and prediction

Parameters:
  • labels (list of NDArray) – The labels of the data.
  • preds (list of NDArray) – Predicted values.
  • wrap (boolean) – If True, wrap labels/preds in a list if they are single NDArray
  • shape (boolean) – If True, check the shape of labels and preds; Otherwise only check their length.