In a method of training a DNN, a weight matrix (W) is provided as a linear combination of matrices/arrays A and C. In a forward cycle, an input vector x is transmitted through arrays A and C and output vector y is read. In a backward cycle, an error signal δ is transmitted through arrays A and C and output vector z is read. Array A is updated by transmitting input vector x and error signal δ through array A. In a forward cycle, an input vector e