Of course. In one epoch, I want to have the two backward of the network, In the first backward, I can get the gradient of every layer which i want to use to update the parameters. And I have the second background with a different cost function.