Nanophotonic media for artificial neural inference | Synapse