mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[PR #150] [CLOSED] fix: remove trailing space in 'map' string comparison in reset_classifier #151
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL2#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepSeek-VL2/pull/150
Author: @Mr-Neutr0n
Created: 2/11/2026
Status: ❌ Closed
Base:
main← Head:fix/reset-classifier-map-trailing-space📝 Commits (1)
4f18a5cfix: remove trailing space in 'map' string comparison in reset_classifier📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
deepseek_vl2/models/siglip_vit.py(+1 -1)📄 Description
Summary
In
deepseek_vl2/models/siglip_vit.py, theVisionTransformer.reset_classifiermethod has a trailing space in a string comparison on theelifbranch:The valid pool types are
('', 'avg', 'token', 'map')— without any trailing space — as enforced by theasserton the line above. Because'map' != 'map 'always evaluates toTrue, callingreset_classifier(num_classes, global_pool='map')incorrectly destroys the attention pooling layer (self.attn_pool = None) even though the user explicitly requested'map'pooling.Fix
Remove the trailing space so the comparison correctly checks against
'map':This ensures that when
global_pool='map'is passed, the existingattn_poolis preserved as intended.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.