The problem is, that you need the gradient of the loss value w.r.t. the different weights of the different weights of your network, to update the weights like you do. But if you just set a number for the loss value, you are missing all these gradients. You can think of it, as setting a number (without any rule) is not a differentiable function, so you can not calculate the gradients.
Why do you want to set the loss value to a certain number ?