Dynamic Encoder for Vision Transformers