Skip to content

Commit b28313e

Browse files
Changed Printing of Class Distribution
1 parent 6cac728 commit b28313e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

utils.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import subprocess
2-
3-
import numpy as np
2+
import collections
43

54

65
def print_data_info(train, x_train, x_test, y_train, y_test):
@@ -13,8 +12,8 @@ def print_data_info(train, x_train, x_test, y_train, y_test):
1312
print("")
1413
print("Train/Test Split: {}/{}".format(len(y_train), len(y_test)))
1514
print("Number of Classes: {}".format(len(train.class_names)))
16-
print("Train Class Split: {}".format(np.bincount(y_train)))
17-
print("Test Class Split: {}".format(np.bincount(y_test)))
15+
print("Train Class Split: {}".format(collections.Counter(y_train)))
16+
print("Test Class Split: {}".format(collections.Counter(y_test)))
1817
print("")
1918
print("x_train: {}".format(x_train.shape))
2019
print("x_test: {}".format(x_test.shape))

0 commit comments

Comments
 (0)