Solved by albanD in post #2 
              
              
                Hi, 
I am not sure this version of addition is supported by Variables. 
What you can do is: 
loss_all = loss_first + B * loss_second