AB739 commited on
Commit
ed95574
·
verified ·
1 Parent(s): b5836aa

Update tasks/audio.py

Browse files
Files changed (1) hide show
  1. tasks/audio.py +3 -0
tasks/audio.py CHANGED
@@ -108,7 +108,10 @@ async def evaluate_audio(request: AudioEvaluationRequest):
108
  #--------------------------------------------------------------------------------------------
109
  predictions = []
110
  with torch.inference_mode():
 
 
111
  for data, target in test_loader:
 
112
  output = model(data).squeeze()
113
  pred = torch.argmax(output, dim=-1)
114
  predictions.extend(pred.tolist())
 
108
  #--------------------------------------------------------------------------------------------
109
  predictions = []
110
  with torch.inference_mode():
111
+ model.eval()
112
+ model.half()
113
  for data, target in test_loader:
114
+ data = data.half()
115
  output = model(data).squeeze()
116
  pred = torch.argmax(output, dim=-1)
117
  predictions.extend(pred.tolist())