Added the T(f[l]) vector in the code, where l indicates the layer number. This vector along with b[l+1] vector will be used for calculating the value of q[l].