Artificial neural networks in photonics