bytchew commited on
Commit
e1373ca
·
verified ·
1 Parent(s): 8ba5cce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -40,8 +40,7 @@ def load_model(repo_id):
40
  # Initialize the ResNet-18 architecture
41
  model = torchvision.models.resnet18(pretrained=False)
42
  num_ftrs = model.fc.in_features
43
- model.fc = nn.Linear(num_ftrs, 100) # Adjust for your task (e.g., 128 classes)
44
- # TODO: check if this number^^ corresponds to the number of classes
45
 
46
  # Load the model weights
47
  state_dict = torch.load(weights_path, map_location=torch.device("cpu"))
 
40
  # Initialize the ResNet-18 architecture
41
  model = torchvision.models.resnet18(pretrained=False)
42
  num_ftrs = model.fc.in_features
43
+ model.fc = nn.Linear(num_ftrs, 100) # Adjust for your number of classes
 
44
 
45
  # Load the model weights
46
  state_dict = torch.load(weights_path, map_location=torch.device("cpu"))