Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nnx] improve mnist tutorial #4316

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

cgarciae
Copy link
Collaborator

What does this PR do?

Uses .eval() on inference in the MNIST Tutorial

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

uv.lock Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated?

@@ -246,6 +246,8 @@ plt.show()
Create a `jit`-compiled model inference function (with `nnx.jit`) - `pred_step` - to generate predictions on the test set using the learned model parameters. This will enable you to visualize test images alongside their predicted labels for a qualitative assessment of model performance.

```{code-cell} ipython3
model.eval() # Switch to evaluation mode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider explaining a bit more why this is necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an explanation.

@cgarciae cgarciae self-assigned this Oct 21, 2024
@copybara-service copybara-service bot merged commit 685b255 into main Oct 21, 2024
19 checks passed
@copybara-service copybara-service bot deleted the improve-mnist-tutorial-2 branch October 21, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants