robocan commited on
Commit
be60ccb
·
verified ·
1 Parent(s): 963d228

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -36,9 +36,10 @@ class ModelPre(torch.nn.Module):
36
  def __init__(self):
37
  super().__init__()
38
  self.embedding = torch.nn.Sequential(
39
- *list(models.efficientnet_v2_m(weights=models.EfficientNet_V2_M_Weights.IMAGENET1K_V1).children())[:-1],
40
  torch.nn.Flatten(),
41
- torch.nn.Linear(in_features=1280,out_features=512),
 
42
  torch.nn.Linear(in_features=512,out_features=len_classes),
43
  )
44
  # Freeze all layers
 
36
  def __init__(self):
37
  super().__init__()
38
  self.embedding = torch.nn.Sequential(
39
+ *list(models.convnext_small(weights=models.ConvNeXt_Small_Weights.IMAGENET1K_V1).children())[:-1],
40
  torch.nn.Flatten(),
41
+ torch.nn.Linear(in_features=768,out_features=512),
42
+ torch.nn.ReLU(),
43
  torch.nn.Linear(in_features=512,out_features=len_classes),
44
  )
45
  # Freeze all layers