Notebook 07 - Lesson 217 to train() function writer object has no attribute "add_scalars" #576
Unanswered
AxisMeetsWorld
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @AxisMeetsWorld , This is strange. Do you know which notebook you're on? Looks like the You could try printing It should be something like: from torch.utils.tensorboard import SummaryWriter
# Create a writer with all default settings
writer = SummaryWriter()
print(type(writer)) Output: <class 'torch.utils.tensorboard.writer.SummaryWriter'> The |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @mrdbourke (or if there is anyone else I can ping),

Ok, I am at the above mentioned lesson, and tried what I could to troubleshoot this one. I did some searches that didn't seem relevant, and even copied and pasted in code from the book lesson of this lecture. I noticed in this current for loop that references the
train()
function that it gets to that portion of the train function where you had set up that writer object. I am getting the above error message, and I copied in what I am seeing below as well. What is very odd considering the way Colab is behaving is when I go up to where we defined thetrain()
function, and enter in the codewriter.
the auto population shows the "add_scalars" function as an option. Why am I getting this error if that is recognized by the code editor? It is a very confusing error message here, and I tried to look at all of the variants we defined, to make sure they were appropriately in place. Please let me know what could be the cause of this error when you get the chance. Here is what I am seeing:Beta Was this translation helpful? Give feedback.
All reactions