Closed wangyf8848 closed 4 months ago
Hello, may I ask if I can get the code of the model? I want to get the patch tokens or even the output of the middle layer, not just the class token.
The get_intermediate_layers function is what you need ! The model code is in https://github.com/facebookresearch/dinov2/blob/main/dinov2/models/vision_transformer.py
Hello, may I ask if I can get the code of the model? I want to get the patch tokens or even the output of the middle layer, not just the class token.