Add weighted sum function to SumLayer