An optoelectronic hardware system that performs a matrix-matrix multip
lication is presented. The system is based on electrically addressable
spatial light modulators for switching and computer generated hologra
ms for connection routeing. The matrix-matrix multiplier is used to im
plement a quantized neural network. A novel algorithm for on-line lear
ning for networks with quantized weights and hard thresholds based on
function smoothing and stochastic approximation is used.