robocan commited on
Commit
dccd8f9
1 Parent(s): 8c907a5

Update app.py

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