Update README.md
Browse files
README.md
CHANGED
@@ -28,12 +28,12 @@ from PIL import Image
|
|
28 |
from urllib.request import urlopen
|
29 |
model = timm.create_model("hf-hub:BVRA/tf_efficientnet_b1.in1k_ft_df20m_299", pretrained=True)
|
30 |
model = model.eval()
|
31 |
-
train_transforms = T.Compose([T.Resize(299),
|
32 |
T.ToTensor(),
|
33 |
T.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])])
|
34 |
img = Image.open(PATH_TO_YOUR_IMAGE)
|
35 |
output = model(train_transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
|
36 |
-
|
37 |
```
|
38 |
|
39 |
## Citation
|
|
|
28 |
from urllib.request import urlopen
|
29 |
model = timm.create_model("hf-hub:BVRA/tf_efficientnet_b1.in1k_ft_df20m_299", pretrained=True)
|
30 |
model = model.eval()
|
31 |
+
train_transforms = T.Compose([T.Resize((299, 299)),
|
32 |
T.ToTensor(),
|
33 |
T.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])])
|
34 |
img = Image.open(PATH_TO_YOUR_IMAGE)
|
35 |
output = model(train_transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
|
36 |
+
|
37 |
```
|
38 |
|
39 |
## Citation
|