Skip to content

Commit 74df327

Browse files
authored
Update 2021-12-22-introducing-torchvision-new-multi-weight-support-api.md
1 parent 36b5590 commit 74df327

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2021-12-22-introducing-torchvision-new-multi-weight-support-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ score = prediction[class_id].item()
5050
with open("imagenet_classes.txt", "r") as f:
5151
categories = [s.strip() for s in f.readlines()]
5252
category_name = categories[class_id]
53-
print(f"{category_name}: ** {100 * score}%")
53+
print(f"{category_name}: {100 * score}%")
5454

5555
```
5656

@@ -89,7 +89,7 @@ prediction = model(batch).squeeze(0).softmax(0)
8989
class_id = prediction.argmax().item()
9090
score = prediction[class_id].item()
9191
category_name = weights.meta["categories"][class_id]
92-
print(f"{category_name}: ** {100 * score}*%*")
92+
print(f"{category_name}: {100 * score}*%*")
9393
```
9494

9595
As we can see the new API eliminates the aforementioned limitations. Let’s explore the new features in detail.

0 commit comments

Comments
 (0)