Open g-abilio opened 3 weeks ago
Hi @g-abilio ,
I just ran the code from here: https://www.learnpytorch.io/02_pytorch_classification/#2-building-a-model
In Google Colab and got the following result:
Which part of the code are you running to get that issue?
Are you running this code to get the plot_decision_boundary
function?
import requests
from pathlib import Path
# Download helper functions from Learn PyTorch repo (if not already downloaded)
if Path("helper_functions.py").is_file():
print("helper_functions.py already exists, skipping download")
else:
print("Downloading helper_functions.py")
request = requests.get("https://raw.githubusercontent.com/mrdbourke/pytorch-deep-learning/main/helper_functions.py")
with open("helper_functions.py", "wb") as f:
f.write(request.content)
from helper_functions import plot_predictions, plot_decision_boundary
Hi, @mrdbourke! Thanks for the response.
The first decision boundary plot (at the topic 4) is the one that is giving raise to this problem. I used the function plot_decision_boundary imported from helper_functions module normally, as I downloaded the module and placed it in a subdirectory at my project.
For greater knowledge of the situation, I obtained a static loss (both for training and testing) and a static accuracy (again, for both training and testing) of 0.5 (50 %), which is close to the expected behavior. However, these metric didn't change at all, they remained absolutely static for 1000 epochs. I don't know if this can impact on the plot, but, to my knowledge, 50% should let into a decision boundary described by a line that separates the dots into two areas evenly.
Hey @g-abilio ,
Hmmm this is strange.
I'm not 100% sure what might be happening. If you are running similar code to the notebook/videos the loss metrics should eventually go down (I check these codes/models regularly).
Have you managed to figure out what might be the issue?
Or did you manage to fix your decision boundary plot?
Hey @g-abilio,
Can you provide a code link to your colab notebook or any other notebook ?
It is always better to double-check.
Problem:
Using the plot_decision_boundary function at the helper_functions script module, the decision boundaries are not being plotted, which is resulting in the following final plot:
Reproduction:
To reproduce this code, you just have to follow the steps on the guide website.