Simulating Hard Attention Using Soft Attention