Optical Memory and Neural Networks