A robot learning from demonstration framework that trains a recurrent neural network for autonomous task execution