muellerzr's picture
muellerzr HF staff
Adding tabs for different set of Accelerate's features and content for large scale training features (#2)
b91e31d
raw
history blame
287 Bytes
<pre>
for batch in dataloader:
optimizer.zero_grad()
inputs, targets = batch
inputs = inputs.to(device)
targets = targets.to(device)
outputs = model(inputs)
loss = loss_function(outputs, targets)
loss.backward()
optimizer.step()
scheduler.step()</pre>