How to only use part of pretrained model 
Hi
I am using BERT for classification, I have a pretrained model, and my question is when I load the model like this:

  model = model_class.from_pretrained(
        args.model_name_or_path,
        from_tf=bool(".ckpt" in args.model_name_or_path),
        config=config,
        cache_dir=args.cache_dir if args.cache_dir else None,
    )


How can I not load the classifier, and only load the BERT encoder.
thanks

How did you obtain your pre-trained model? Does your pre-train model have a classification head? What is `model_class`? Is it `BertForSequenceClassification`?<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
