Pytorch, Deep Learning, Optimization, Tensorboard, Deep Dives.
data[1].to(device=device, non_blocking=True) # convert to float32 and normalize inputs = (inputs.to(torch.float32) / 255. - 0.5) / 0.5 outputs = model(inputs) loss = criterion(outputs, labels) optimizer.zero_grad() loss.backward() optimizer.step() As a result of this change the amount of data being