Aravindan commited on
Commit
d54327b
·
1 Parent(s): fd04487

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import numpy as np
4
  import torchvision.models as models
5
  from torchvision import transforms as T
6
 
 
7
  new_model = models.resnet18()
8
  num_ftrs = new_model.fc.in_features
9
  new_model.fc = nn.Linear(num_ftrs, 75)
 
4
  import torchvision.models as models
5
  from torchvision import transforms as T
6
 
7
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
8
  new_model = models.resnet18()
9
  num_ftrs = new_model.fc.in_features
10
  new_model.fc = nn.Linear(num_ftrs, 75)