Spaces:
Sleeping
Sleeping
Update model.py
Browse files
model.py
CHANGED
|
@@ -14,7 +14,7 @@ def create_vit_model(num_classes: int = 10,
|
|
| 14 |
model = torchvision.models.vit_b_16(weights=weights)
|
| 15 |
|
| 16 |
# 4. Freeze the base layers
|
| 17 |
-
for param in model.parameters()
|
| 18 |
param.requires_grad = False
|
| 19 |
|
| 20 |
# 5. Adjust the number of heads(output)
|
|
|
|
| 14 |
model = torchvision.models.vit_b_16(weights=weights)
|
| 15 |
|
| 16 |
# 4. Freeze the base layers
|
| 17 |
+
for param in model.parameters():
|
| 18 |
param.requires_grad = False
|
| 19 |
|
| 20 |
# 5. Adjust the number of heads(output)
|