  Photonic integrated circuits are facilitating the development of optical
neural networks, which have the potential to be both faster and more energy
efficient than their electronic counterparts since optical signals are
especially well-suited for implementing matrix multiplications. However,
accurate programming of photonic chips for optical matrix multiplication
remains a difficult challenge. Here, we describe both simple analytical models
and data-driven models for offline training of optical matrix multipliers. We
train and evaluate the models using experimental data obtained from a
fabricated chip featuring a Mach-Zehnder interferometer mesh implementing
3-by-3 matrix multiplication. The neural network-based models outperform the
simple physics-based models in terms of prediction error. Furthermore, the
neural network models are also able to predict the spectral variations in the
matrix weights for up to 100 frequency channels covering the C-band. The use of
neural network models for programming the chip for optical matrix
multiplication yields increased performance on multiple machine learning tasks.
