    def reset_classifier(self, num_classes: int, global_pool: Optional[str] = None) -> None:
        """
        Method results the classification head
        Args:
            num_classes (`int`):
                Number of classes to be predicted.
            global_pool (`str`):
                If not global pooling is updated.
        """
        self.num_classes: int = num_classes
        if global_pool is not None:
            self.global_pool = global_pool
        self.head = nn.Linear(self.num_features, num_classes) if num_classes > 0 else nn.Identity()
Method results the classification head
Args:
num_classes (`int`):
Number of classes to be predicted.
global_pool (`str`):
If not global pooling is updated.
towhee/models/max_vit/max_vit.py