Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -570,7 +570,7 @@ class BaseModel(nn.Module):
|
|
570 |
|
571 |
def __init__(self, num_classes, device='cuda' if torch.cuda.is_available() else 'cpu'):
|
572 |
super().__init__()
|
573 |
-
self.device =
|
574 |
self.backbone = efficientnet_v2_m(weights=EfficientNet_V2_M_Weights.IMAGENET1K_V1)
|
575 |
self.feature_dim = self.backbone.classifier[1].in_features
|
576 |
self.backbone.classifier = nn.Identity()
|
|
|
570 |
|
571 |
def __init__(self, num_classes, device='cuda' if torch.cuda.is_available() else 'cpu'):
|
572 |
super().__init__()
|
573 |
+
self.device = device_mgr.get_optimal_device()
|
574 |
self.backbone = efficientnet_v2_m(weights=EfficientNet_V2_M_Weights.IMAGENET1K_V1)
|
575 |
self.feature_dim = self.backbone.classifier[1].in_features
|
576 |
self.backbone.classifier = nn.Identity()
|