We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The function
def train_batch(x, y, model, opt, loss_fn): prediction = model(x)[0] batch_loss = loss_fn(prediction, y) batch_loss.backward() optimizer.step() optimizer.zero_grad()
has parameter opt and then uses optimizer which isn't passed in so it must be using a global value.
The text was updated successfully, but these errors were encountered:
Just to mention: it is useful to mention where in the book you encountered this error (at least the Chapter)
Sorry, something went wrong.
Seen on the Chap4 (CNN_working_details.ipynb)
No branches or pull requests
The function
has parameter opt and then uses optimizer which isn't passed in so it must be using a global value.
The text was updated successfully, but these errors were encountered: