Deep generative learning of location-invariant visual word recognition