eternalBlissard commited on
Commit
55e8d00
·
verified ·
1 Parent(s): 71c2fd4

Update predictor.py

Browse files
Files changed (1) hide show
  1. predictor.py +1 -0
predictor.py CHANGED
@@ -18,6 +18,7 @@ def predictionMaker(img):
18
  ViTModel.to('cuda')
19
  startTime = timer()
20
  img = VitTransforms(img).unsqueeze(0)
 
21
  ViTModel.eval()
22
  with torch.inference_mode():
23
  predProbs = torch.softmax(ViTModel(img),dim=1)
 
18
  ViTModel.to('cuda')
19
  startTime = timer()
20
  img = VitTransforms(img).unsqueeze(0)
21
+ img = img.to('cuda')
22
  ViTModel.eval()
23
  with torch.inference_mode():
24
  predProbs = torch.softmax(ViTModel(img),dim=1)