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

Add Introduction to PyTorch tutorial #2440

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

adamjstewart
Copy link
Collaborator

The first of many tutorials introduced for #2418

This tutorial is designed for remote sensing folks with little to no background in deep learning or PyTorch. It provides a foundation upon which all later tutorials will build.

@adamjstewart adamjstewart added this to the 0.6.2 milestone Dec 2, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 2, 2024
{
"cells": [
{
"cell_type": "code",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would like to start formatting the copyright in code cells, as tools like ruff can only check code cells: astral-sh/ruff#12802

"source": [
"# Introduction to PyTorch\n",
"\n",
"_Written by: Adam J. Stewart_\n",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would like to start giving people credit for the tutorials they write, especially for the case study tutorials. This is intended to be the first person who wrote the tutorial, we wouldn't append other names except in the case of major revisions.

Copy link
Member

Choose a reason for hiding this comment

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

great idea

"id": "eb5dc7e8-6cb3-4457-83ad-7fa5aef8ea0c",
"metadata": {
"nbmake": {
"mock": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The tutorial runs for 100 epochs, but we mock it to only run for a single epoch during testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This new tutorial only takes 9.69s to test.

"metadata": {},
"outputs": [],
"source": [
"evaluate(test_dataloader)"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Final accuracies are 65% on validation and 85% on testing. Pretty good for only 100 images. We are nowhere near plateauing, and could run for longer to get higher accuracies, but I think this proves the point.

@adamjstewart adamjstewart mentioned this pull request Dec 1, 2024
25 tasks
@calebrob6
Copy link
Member

calebrob6 commented Dec 3, 2024

Would not put "self driving cars" as an example of DL

@adamjstewart
Copy link
Collaborator Author

adamjstewart commented Dec 3, 2024

Why not? I think it's a good example of a vision problem that would be familiar to a general audience.

docs/tutorials/pytorch.ipynb Show resolved Hide resolved
docs/tutorials/pytorch.ipynb Show resolved Hide resolved
docs/tutorials/pytorch.ipynb Show resolved Hide resolved
@adamjstewart adamjstewart merged commit 44a2db3 into microsoft:main Dec 8, 2024
20 checks passed
@adamjstewart adamjstewart deleted the tutorials/pytorch branch December 8, 2024 01:27
calebrob6 pushed a commit that referenced this pull request Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants