We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e471a27 + 31209f2 commit 0ac4cd0Copy full SHA for 0ac4cd0
art/utils.py
@@ -805,7 +805,7 @@ def check_and_transform_label_format(
805
labels_return = np.expand_dims(labels_return, axis=1)
806
elif len(labels.shape) == 2 and labels.shape[1] == 1:
807
if nb_classes is None:
808
- nb_classes = np.max(labels) + 1
+ nb_classes = int(np.max(labels) + 1)
809
if nb_classes > 2: # multi-class, index labels
810
if return_one_hot:
811
labels_return = to_categorical(labels, nb_classes)
0 commit comments