From 2b25f8c09cb3696519b635278ed5ee3961878005 Mon Sep 17 00:00:00 2001 From: Carter Tran Date: Thu, 22 Aug 2024 14:16:25 -0700 Subject: [PATCH 1/4] Update 07_pytorch_experiment_tracking.ipynb Install tensorboard if not found --- 07_pytorch_experiment_tracking.ipynb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/07_pytorch_experiment_tracking.ipynb b/07_pytorch_experiment_tracking.ipynb index c2beea2..89fcd87 100644 --- a/07_pytorch_experiment_tracking.ipynb +++ b/07_pytorch_experiment_tracking.ipynb @@ -745,7 +745,13 @@ "metadata": {}, "outputs": [], "source": [ - "from torch.utils.tensorboard import SummaryWriter\n", + "try:\n", + " from torch.utils.tensorboard import SummaryWriter\n", + "except:\n", + " print(\"[INFO] Couldn't find tensorboard... installing it.\")\n", + " !pip install -q tensorboard\n", + " from torch.utils.tensorboard import SummaryWriter\n", + "\n", "\n", "# Create a writer with all default settings\n", "writer = SummaryWriter()" From 17514b7cbee99e99b0c4167c2c920abf783ca00b Mon Sep 17 00:00:00 2001 From: Carter Tran Date: Thu, 22 Aug 2024 15:19:55 -0700 Subject: [PATCH 2/4] Update 07_pytorch_experiment_tracking.ipynb Fix typo --- 07_pytorch_experiment_tracking.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07_pytorch_experiment_tracking.ipynb b/07_pytorch_experiment_tracking.ipynb index 89fcd87..adf9237 100644 --- a/07_pytorch_experiment_tracking.ipynb +++ b/07_pytorch_experiment_tracking.ipynb @@ -2304,7 +2304,7 @@ "source": [ "Running the cell above we should get an output similar to the following.\n", "\n", - "> **Note:** Depending on the random seeds you used/hardware you used there's a chance your numbers aren't exactly the same as what's here. This is okay. It's due to the inheret randomness of deep learning. What matters most is the trend. Where your numbers are heading. If they're off by a large amount, perhaps there's something wrong and best to go back and check the code. But if they're off by a small amount (say a couple of decimal places or so), that's okay. \n", + "> **Note:** Depending on the random seeds you used/hardware you used there's a chance your numbers aren't exactly the same as what's here. This is okay. It's due to the inherent randomness of deep learning. What matters most is the trend. Where your numbers are heading. If they're off by a large amount, perhaps there's something wrong and best to go back and check the code. But if they're off by a small amount (say a couple of decimal places or so), that's okay. \n", "\n", "\"various\n", "\n", From 8adeffb3b663d554b1052a346bde892c0a63baba Mon Sep 17 00:00:00 2001 From: Carter Tran Date: Thu, 22 Aug 2024 15:31:42 -0700 Subject: [PATCH 3/4] Update docs/02_pytorch_classification.ipynb Fix typo --- docs/02_pytorch_classification.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_pytorch_classification.ipynb b/docs/02_pytorch_classification.ipynb index 7ea559a..1c28199 100644 --- a/docs/02_pytorch_classification.ipynb +++ b/docs/02_pytorch_classification.ipynb @@ -2391,7 +2391,7 @@ "\n", "PyTorch has a bunch of [ready-made non-linear activation functions](https://pytorch.org/docs/stable/nn.html#non-linear-activations-weighted-sum-nonlinearity) that do similiar but different things. \n", "\n", - "One of the most common and best performing is [ReLU](https://en.wikipedia.org/wiki/Rectifier_(neural_networks) (rectified linear-unit, [`torch.nn.ReLU()`](https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html)).\n", + "One of the most common and best performing is [ReLU](https://en.wikipedia.org/wiki/Rectifier_(neural_networks)) (rectified linear-unit, [`torch.nn.ReLU()`](https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html)).\n", "\n", "Rather than talk about it, let's put it in our neural network between the hidden layers in the forward pass and see what happens." ] From 554233b4e982ed7ec8402e8799caa9d9a9f51401 Mon Sep 17 00:00:00 2001 From: Carter Tran Date: Thu, 22 Aug 2024 15:33:24 -0700 Subject: [PATCH 4/4] Update docs/07_pytorch_experiment_tracking.ipynb Fix typo and tensorboard installation --- docs/07_pytorch_experiment_tracking.ipynb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/07_pytorch_experiment_tracking.ipynb b/docs/07_pytorch_experiment_tracking.ipynb index e0be403..5fb2c98 100644 --- a/docs/07_pytorch_experiment_tracking.ipynb +++ b/docs/07_pytorch_experiment_tracking.ipynb @@ -725,7 +725,13 @@ "metadata": {}, "outputs": [], "source": [ - "from torch.utils.tensorboard import SummaryWriter\n", + "try:\n", + " from torch.utils.tensorboard import SummaryWriter\n", + "except:\n", + " print(\"[INFO] Couldn't find tensorboard... installing it.\")\n", + " !pip install -q tensorboard\n", + " from torch.utils.tensorboard import SummaryWriter\n", + "\n", "\n", "# Create a writer with all default settings\n", "writer = SummaryWriter()" @@ -2254,7 +2260,7 @@ "source": [ "Running the cell above we should get an output similar to the following.\n", "\n", - "> **Note:** Depending on the random seeds you used/hardware you used there's a chance your numbers aren't exactly the same as what's here. This is okay. It's due to the inheret randomness of deep learning. What matters most is the trend. Where your numbers are heading. If they're off by a large amount, perhaps there's something wrong and best to go back and check the code. But if they're off by a small amount (say a couple of decimal places or so), that's okay. \n", + "> **Note:** Depending on the random seeds you used/hardware you used there's a chance your numbers aren't exactly the same as what's here. This is okay. It's due to the inherent randomness of deep learning. What matters most is the trend. Where your numbers are heading. If they're off by a large amount, perhaps there's something wrong and best to go back and check the code. But if they're off by a small amount (say a couple of decimal places or so), that's okay. \n", "\n", "\"various\n", "\n",