Update README.md
Browse files
README.md
CHANGED
@@ -49,6 +49,17 @@ display(dataset)
|
|
49 |
train_testvalid = dataset.train_test_split(test_size=0.1, shuffle=True, seed=12071998)
|
50 |
display(train_testvalid)
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
```
|
54 |
|
|
|
49 |
train_testvalid = dataset.train_test_split(test_size=0.1, shuffle=True, seed=12071998)
|
50 |
display(train_testvalid)
|
51 |
|
52 |
+
# get the number of different labels in the train, test and validation set
|
53 |
+
display(train_testvalid["train"].features["label"])
|
54 |
+
display(train_testvalid["test"].features["label"].num_classes)
|
55 |
+
|
56 |
+
# check how many labels/number of classes
|
57 |
+
num_classes = len(set(train_testvalid["train"]['label']))
|
58 |
+
labels = train_testvalid["train"].features['label']
|
59 |
+
print(um_classes, labels)
|
60 |
+
|
61 |
+
|
62 |
+
display(train_testvalid["train"][0]['image'])
|
63 |
|
64 |
```
|
65 |
|