AB739 commited on
Commit
fdc54cd
·
verified ·
1 Parent(s): 2d5af37

Update tasks/audio.py

Browse files
Files changed (1) hide show
  1. tasks/audio.py +1 -1
tasks/audio.py CHANGED
@@ -100,7 +100,7 @@ async def evaluate_audio(request: AudioEvaluationRequest):
100
  #--------------------------------------------------------------------------------------------
101
  predictions = []
102
  with torch.no_grad():
103
- with autocast():
104
  for data, target in test_loader:
105
  outputs = scripted_model(data)
106
  _, predicted = torch.max(outputs, 1)
 
100
  #--------------------------------------------------------------------------------------------
101
  predictions = []
102
  with torch.no_grad():
103
+ with autocast(device_type='cpu'):
104
  for data, target in test_loader:
105
  outputs = scripted_model(data)
106
  _, predicted = torch.max(outputs, 1)