bytchew commited on
Commit
b0dca77
·
verified ·
1 Parent(s): 02f9360

Upload model.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -13,7 +13,7 @@ def load_model(repo_id):
13
  weights_path = hf_hub_download(repo_id=model_repo_id, filename=weight_file_id)
14
 
15
  # Initialize the ResNet-18 architecture
16
- model = torchvision.models.resnet18(pretrained=True)
17
  num_ftrs = model.fc.in_features
18
  model.fc = nn.Linear(num_ftrs, 100) # Adjust for your task (e.g., 128 classes)
19
 
 
13
  weights_path = hf_hub_download(repo_id=model_repo_id, filename=weight_file_id)
14
 
15
  # Initialize the ResNet-18 architecture
16
+ model = torchvision.models.resnet18(pretrained=False)
17
  num_ftrs = model.fc.in_features
18
  model.fc = nn.Linear(num_ftrs, 100) # Adjust for your task (e.g., 128 classes)
19