Update README.md
Browse files
README.md
CHANGED
@@ -39,7 +39,7 @@ outputs = model(images, alpha=0.7)
|
|
39 |
labels, scores = outputs["vocabularies"][0], outputs["scores"][0]
|
40 |
|
41 |
# print the top 5 most likely labels for the image
|
42 |
-
values, indices = scores.
|
43 |
print("\nTop predictions:\n")
|
44 |
for value, index in zip(values, indices):
|
45 |
print(f"{labels[index]:>16s}: {100 * value.item():.2f}%")
|
|
|
39 |
labels, scores = outputs["vocabularies"][0], outputs["scores"][0]
|
40 |
|
41 |
# print the top 5 most likely labels for the image
|
42 |
+
values, indices = scores.topk(3)
|
43 |
print("\nTop predictions:\n")
|
44 |
for value, index in zip(values, indices):
|
45 |
print(f"{labels[index]:>16s}: {100 * value.item():.2f}%")
|