nbgrader allows us to generate "non-solution" notebooks from "solution" notebooks. More concretely, a Coordinator may write a function like the following:
def train_loop(data: Batches, n_epochs: int = 500):
# ... some magical preprocessing happens
for epoch in range(n_epochs):
# implement the training loop
### BEGIN SOLUTION
for batch in data:
input, labels = [x.to(device) for x in batch]
optim.zero_grad()
output = model(input)
# some more code
### END SOLUTION
and nbgrader will process this cell to produce the following output:
def train_loop(data: Batches, n_epochs: int = 500):
# ... some magical preprocessing happens
for epoch in range(n_epochs):
# implement the training loop
### YOUR CODE HERE
raise NotImplementedError()
Tasks
nbgraderallows us to generate "non-solution" notebooks from "solution" notebooks. More concretely, a Coordinator may write a function like the following:and
nbgraderwill process this cell to produce the following output:Tasks
🔑 Required) Retrievenbgrader'serror and dump that to the screen.🍜 Nice to Have) Attempt to correct the error