Update README.md
Browse files
README.md
CHANGED
@@ -32,7 +32,7 @@ transform = ImageNetTransform(train=False, img_size=224)
|
|
32 |
x = transform(read_rgb("cat.png"))
|
33 |
x = mx.expand_dims(x, 0)
|
34 |
|
35 |
-
model = create_model("swin_tiny_patch4_window7_224
|
36 |
model.eval()
|
37 |
|
38 |
logits = model(x)
|
@@ -49,13 +49,13 @@ x = transform(read_rgb("cat.png"))
|
|
49 |
x = mx.expand_dims(x, 0)
|
50 |
|
51 |
# first option
|
52 |
-
model = create_model("swin_tiny_patch4_window7_224
|
53 |
model.eval()
|
54 |
|
55 |
embeds = model(x)
|
56 |
|
57 |
# second option
|
58 |
-
model = create_model("swin_tiny_patch4_window7_224
|
59 |
model.eval()
|
60 |
|
61 |
embeds = model.get_features(x)
|
|
|
32 |
x = transform(read_rgb("cat.png"))
|
33 |
x = mx.expand_dims(x, 0)
|
34 |
|
35 |
+
model = create_model("swin_tiny_patch4_window7_224")
|
36 |
model.eval()
|
37 |
|
38 |
logits = model(x)
|
|
|
49 |
x = mx.expand_dims(x, 0)
|
50 |
|
51 |
# first option
|
52 |
+
model = create_model("swin_tiny_patch4_window7_224", num_classes=0)
|
53 |
model.eval()
|
54 |
|
55 |
embeds = model(x)
|
56 |
|
57 |
# second option
|
58 |
+
model = create_model("swin_tiny_patch4_window7_224")
|
59 |
model.eval()
|
60 |
|
61 |
embeds = model.get_features(x)
|