Skip to content

Commit

Permalink
specify that torch uses cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
BSalita committed Oct 12, 2023
1 parent 712fec4 commit 5f59e53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def Predict_Game_Results():
# Make predictions
model_for_pred.eval()
with torch.no_grad():
predictions_scaled = model_for_pred(torch.tensor(X_scaled, dtype=torch.float32)) # so fast (1ms) that we're good with using the CPU
predictions_scaled = model_for_pred(torch.tensor(X_scaled, dtype=torch.float32)).cpu() # so fast (1ms) that we're good with using the CPU

predictions = y_scaler.inverse_transform(predictions_scaled.numpy())
predictions_s = pd.Series(predictions.flatten())
Expand Down

0 comments on commit 5f59e53

Please sign in to comment.