[2310.06171] Memory-Consistent Neural Networks for Imitation Learning