Inferring Motor Programs from Images of Handwritten Digits