Solved by Usama_Hasan in post #2 
              
              
                Hy @Zecheng_Zhang, 

A better way to this would be. 
loss = loss1 + loss2 + loss3

But I don’t think this link here makes any sense. 

and the rest because loss won’t have l1 as it’s attribute.