Skip to content
Discussion options

You must be logged in to vote

Hi @slawomirwojtas ,

A slight correction to your code.

Your code:

# Make predictions with model
with torch.inference.mode():
  y_preds = model_0(X_test)

Fixed:

# Make predictions with model
with torch.inference_mode():
  y_preds = model_0(X_test)

Notice the torch.inference.mode() -> torch.inference_mode(), it's an _ rather than ..

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@slawomirwojtas
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants