Neural nets weights matrix calculation.