Safetensors
vit
anomani13 commited on
Commit
872e9b6
·
verified ·
1 Parent(s): 1b17aee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -2,3 +2,19 @@
2
  license: mit
3
  ---
4
  lat_mean=39.951163 lat_std=0.000596 lon_mean=-75.19156 lon_std=0.000609
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: mit
3
  ---
4
  lat_mean=39.951163 lat_std=0.000596 lon_mean=-75.19156 lon_std=0.000609
5
+
6
+
7
+ class CustomViTModel(ViTForImageClassification, PyTorchModelHubMixin):
8
+ def __init__(self, config):
9
+ super().__init__(config)
10
+ self.classifier = nn.Linear(self.classifier.in_features, config.num_labels)
11
+
12
+ model_name = "WinKawaks/vit-tiny-patch16-224"
13
+
14
+ num_classes = 2
15
+
16
+ custom_model = CustomViTModel.from_pretrained(
17
+ model_name,
18
+ num_labels=num_classes,
19
+ ignore_mismatched_sizes=True
20
+ )