remove 07 v2 and remove WIP tag from 07

This commit is contained in:
mrdbourke committed 2022-06-23 10:31:40 +00:00
1 parent 1f6e785120
commit df1da96e8e
3 files changed
+25 -2710

No files matched your search

+24 -8
View File
@@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# (WIP) 07. PyTorch Experiment Tracking\n",
"# 07. PyTorch Experiment Tracking\n",
"\n",
"> **Note:** This notebook uses `torchvision`'s upcoming [multi-weight support API (coming in `torchvision` v0.13)](https://pytorch.org/blog/introducing-torchvision-new-multi-weight-support-api/). \n",
">\n",
@@ -1279,9 +1279,6 @@
" writer.close()\n",
" else:\n",
" pass\n",
" \n",
" # Close the writer\n",
" writer.close()\n",
" ### End new ###\n",
"\n",
" # Return the filled results at the end of the epochs\n",
@@ -2588,10 +2585,10 @@
"\n",
"All exercises should be completed using [device-agnostic code](https://pytorch.org/docs/stable/notes/cuda.html#device-agnostic-code).\n",
"\n",
"**TK: Resources:**\n",
"* [Exercise template notebook for 07](https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/exercises/06_pytorch_transfer_learning_exercises.ipynb)\n",
"* [Example solutions notebook for 07](https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/solutions/06_pytorch_transfer_learning_exercise_solutions.ipynb) (try the exercises *before* looking at this)\n",
" * See a live [video walkthrough of the solutions on YouTube](https://youtu.be/ueLolShyFqs) (errors and all)\n",
"**Resources:**\n",
"* [Exercise template notebook for 07](https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/exercises/07_pytorch_experiment_tracking_exercise_template.ipynb)\n",
"* [Example solutions notebook for 07](https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/solutions/07_pytorch_experiment_tracking_exercise_solutions.ipynb) (try the exercises *before* looking at this)\n",
" * See a live [video walkthrough of the solutions on YouTube](https://youtu.be/cO_r2FYcAjU) (errors and all)\n",
"\n",
"\n",
"1. Pick a larger model from [`torchvision.models`](https://pytorch.org/vision/main/models.html) to add to the list of experiments (for example, EffNetB3 or higher). \n",
@@ -2609,6 +2606,25 @@
" normalize\n",
"])\n",
"\n",
"# Helper function to view images in a DataLoader (works with data augmentation transforms or not) \n",
"def view_dataloader_images(dataloader, n=10):\n",
" if n > 10:\n",
" print(f\"Having n higher than 10 will create messy plots, lowering to 10.\")\n",
" n = 10\n",
" imgs, labels = next(iter(dataloader))\n",
" plt.figure(figsize=(16, 8))\n",
" for i in range(n):\n",
" # Min max scale the image for display purposes\n",
" targ_image = imgs[i]\n",
" sample_min, sample_max = targ_image.min(), targ_image.max()\n",
" sample_scaled = (targ_image - sample_min)/(sample_max - sample_min)\n",
"\n",
" # Plot images with appropriate axes information\n",
" plt.subplot(1, 10, i+1)\n",
" plt.imshow(sample_scaled.permute(1, 2, 0)) # resize for Matplotlib requirements\n",
" plt.title(class_names[labels[i]])\n",
" plt.axis(False)\n",
"\n",
"# Have to update `create_dataloaders()` to handle different augmentations\n",
"import os\n",
"from torch.utils.data import DataLoader\n",
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -36,7 +36,7 @@ nav:
- 05. PyTorch Going Modular: '05_pytorch_going_modular.md'
- 06. PyTorch transfer learning: '06_pytorch_transfer_learning.ipynb'
- 06. PyTorch transfer learning V2: '06_pytorch_transfer_learning_v2.ipynb'
- (WIP) 07. PyTorch experiment tracking: '07_pytorch_experiment_tracking.ipynb'
- 07. PyTorch experiment tracking: '07_pytorch_experiment_tracking.ipynb'
extra:
social: