Dynamic Grained Encoder for Vision Transformers