Ferroelectric memory based on two-dimensional materials for neuromorphic computing