Solved by braindotai in post #9 
              
              
                No need to call .backward() for actual_loss, in fact no need to calculate it as it ain’t affecting training. 
Though in your case I think the training loop should look like - 
accumulations = 2
scaled_loss = 0
optimizer.zero_grad()
epochs = 20
training_steps_losses = []
for epoch in range(epochs):
 …