Insitu training of classical and quantum photonic neural networks | Synapse