Handwritten digits from 0-9 are input as a "flattened" vector of size 784x1. This vector gets multiplied with a pre-trained m0 matrixed. Subsequently, a rectifier function is performed on the output to filter out negative correlations. Afterwards, the result is multiplied with a pre-trained m1 matrix, and argmax is used to determine the index with the highest correlation.