Update README.md
Browse files
README.md
CHANGED
@@ -11,7 +11,7 @@ from torchvision import transforms
|
|
11 |
from transformers import ViTForImageClassification, ViTImageProcessor
|
12 |
|
13 |
# Load the trained model
|
14 |
-
model_path = '
|
15 |
model = ViTForImageClassification.from_pretrained('google/vit-base-patch16-224')
|
16 |
model.classifier = torch.nn.Linear(model.classifier.in_features, 2)
|
17 |
model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
|
|
|
11 |
from transformers import ViTForImageClassification, ViTImageProcessor
|
12 |
|
13 |
# Load the trained model
|
14 |
+
model_path = 'vit_model.pth'
|
15 |
model = ViTForImageClassification.from_pretrained('google/vit-base-patch16-224')
|
16 |
model.classifier = torch.nn.Linear(model.classifier.in_features, 2)
|
17 |
model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
|