You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the notebook "Part 3 - Training Neural Networks (Solution).ipynb" in Intro to Pytorch, in the 3rd code cell (I pasted it below), I see that we use the nn.LogSoftmax() layer at the end, so I think at the forward pass step, logits = model(images), the name of the output is not logits, I think we should use another name, like just "output" or "logsoftmax_output".
model = nn.Sequential(nn.Linear(784, 128),
nn.ReLU(),
nn.Linear(128, 64),
nn.ReLU(),
nn.Linear(64, 10),
**nn.LogSoftmax(dim=1)**)
# Define the loss
criterion = nn.NLLLoss()
# Get our data
images, labels = next(iter(trainloader))
# Flatten images
images = images.view(images.shape[0], -1)
**# Forward pass, get our logits
logits = model(images)
# Calculate the loss with the logits and the labels
loss = criterion(logits, labels) ```**
The text was updated successfully, but these errors were encountered:
Hi,
For the notebook "Part 3 - Training Neural Networks (Solution).ipynb" in Intro to Pytorch, in the 3rd code cell (I pasted it below), I see that we use the nn.LogSoftmax() layer at the end, so I think at the forward pass step, logits = model(images), the name of the output is not logits, I think we should use another name, like just "output" or "logsoftmax_output".
The text was updated successfully, but these errors were encountered: