# TFAutoModelForSequenceClassification

#### TFAutoModelForSequenceClassification

#### class transformers.TFAutoModelForSequenceClassification

[\<source>](https://github.com/huggingface/transformers/blob/v4.34.1/src/transformers/models/auto/modeling_tf_auto.py#L626)

( \*args\*\*kwargs )

This is a generic model class that will be instantiated as one of the model classes of the library (with a sequence classification head) when created with the [from\_pretrained()](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_pretrained) class method or the [from\_config()](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_config) class method.

This class cannot be instantiated directly using `__init__()` (throws an error).

**from\_config**

[\<source>](https://github.com/huggingface/transformers/blob/v4.34.1/src/transformers/models/auto/auto_factory.py#L417)

( \*\*kwargs )

Parameters

* **config** ([PretrainedConfig](https://huggingface.co/docs/transformers/v4.34.1/en/main_classes/configuration#transformers.PretrainedConfig)) — The model class to instantiate is selected based on the configuration class:
  * [AlbertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/albert#transformers.AlbertConfig) configuration class: [TFAlbertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/albert#transformers.TFAlbertForSequenceClassification) (ALBERT model)
  * [BartConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bart#transformers.BartConfig) configuration class: [TFBartForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bart#transformers.TFBartForSequenceClassification) (BART model)
  * [BertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bert#transformers.BertConfig) configuration class: [TFBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bert#transformers.TFBertForSequenceClassification) (BERT model)
  * [CTRLConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/ctrl#transformers.CTRLConfig) configuration class: [TFCTRLForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/ctrl#transformers.TFCTRLForSequenceClassification) (CTRL model)
  * [CamembertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/camembert#transformers.CamembertConfig) configuration class: [TFCamembertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/camembert#transformers.TFCamembertForSequenceClassification) (CamemBERT model)
  * [ConvBertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/convbert#transformers.ConvBertConfig) configuration class: [TFConvBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/convbert#transformers.TFConvBertForSequenceClassification) (ConvBERT model)
  * [DebertaConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta#transformers.DebertaConfig) configuration class: [TFDebertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta#transformers.TFDebertaForSequenceClassification) (DeBERTa model)
  * [DebertaV2Config](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta-v2#transformers.DebertaV2Config) configuration class: [TFDebertaV2ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta-v2#transformers.TFDebertaV2ForSequenceClassification) (DeBERTa-v2 model)
  * [DistilBertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/distilbert#transformers.DistilBertConfig) configuration class: [TFDistilBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/distilbert#transformers.TFDistilBertForSequenceClassification) (DistilBERT model)
  * [ElectraConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/electra#transformers.ElectraConfig) configuration class: [TFElectraForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/electra#transformers.TFElectraForSequenceClassification) (ELECTRA model)
  * [EsmConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/esm#transformers.EsmConfig) configuration class: [TFEsmForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/esm#transformers.TFEsmForSequenceClassification) (ESM model)
  * [FlaubertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/flaubert#transformers.FlaubertConfig) configuration class: [TFFlaubertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/flaubert#transformers.TFFlaubertForSequenceClassification) (FlauBERT model)
  * [FunnelConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/funnel#transformers.FunnelConfig) configuration class: [TFFunnelForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification) (Funnel Transformer model)
  * [GPT2Config](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gpt2#transformers.GPT2Config) configuration class: [TFGPT2ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gpt2#transformers.TFGPT2ForSequenceClassification) (OpenAI GPT-2 model)
  * [GPTJConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gptj#transformers.GPTJConfig) configuration class: [TFGPTJForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gptj#transformers.TFGPTJForSequenceClassification) (GPT-J model)
  * [LayoutLMConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlm#transformers.LayoutLMConfig) configuration class: [TFLayoutLMForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlm#transformers.TFLayoutLMForSequenceClassification) (LayoutLM model)
  * [LayoutLMv3Config](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config) configuration class: [TFLayoutLMv3ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForSequenceClassification) (LayoutLMv3 model)
  * [LongformerConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/longformer#transformers.LongformerConfig) configuration class: [TFLongformerForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/longformer#transformers.TFLongformerForSequenceClassification) (Longformer model)
  * [MPNetConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mpnet#transformers.MPNetConfig) configuration class: [TFMPNetForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mpnet#transformers.TFMPNetForSequenceClassification) (MPNet model)
  * [MobileBertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mobilebert#transformers.MobileBertConfig) configuration class: [TFMobileBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mobilebert#transformers.TFMobileBertForSequenceClassification) (MobileBERT model)
  * [OpenAIGPTConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/openai-gpt#transformers.OpenAIGPTConfig) configuration class: [TFOpenAIGPTForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/openai-gpt#transformers.TFOpenAIGPTForSequenceClassification) (OpenAI GPT model)
  * [RemBertConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/rembert#transformers.RemBertConfig) configuration class: [TFRemBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/rembert#transformers.TFRemBertForSequenceClassification) (RemBERT model)
  * [RoFormerConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roformer#transformers.RoFormerConfig) configuration class: [TFRoFormerForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roformer#transformers.TFRoFormerForSequenceClassification) (RoFormer model)
  * [RobertaConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta#transformers.RobertaConfig) configuration class: [TFRobertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification) (RoBERTa model)
  * [RobertaPreLayerNormConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig) configuration class: [TFRobertaPreLayerNormForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForSequenceClassification) (RoBERTa-PreLayerNorm model)
  * [TapasConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/tapas#transformers.TapasConfig) configuration class: [TFTapasForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/tapas#transformers.TFTapasForSequenceClassification) (TAPAS model)
  * [TransfoXLConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/transfo-xl#transformers.TransfoXLConfig) configuration class: [TFTransfoXLForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/transfo-xl#transformers.TFTransfoXLForSequenceClassification) (Transformer-XL model)
  * [XLMConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm#transformers.XLMConfig) configuration class: [TFXLMForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm#transformers.TFXLMForSequenceClassification) (XLM model)
  * [XLMRobertaConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig) configuration class: [TFXLMRobertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForSequenceClassification) (XLM-RoBERTa model)
  * [XLNetConfig](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlnet#transformers.XLNetConfig) configuration class: [TFXLNetForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlnet#transformers.TFXLNetForSequenceClassification) (XLNet model)

Instantiates one of the model classes of the library (with a sequence classification head) from a configuration.

Note: Loading a model from its configuration file does **not** load the model weights. It only affects the model’s configuration. Use [from\_pretrained()](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_pretrained) to load the model weights.



Examples:

Copied

```
>>> from transformers import AutoConfig, TFAutoModelForSequenceClassification

>>> # Download configuration from huggingface.co and cache.
>>> config = AutoConfig.from_pretrained("bert-base-cased")
>>> model = TFAutoModelForSequenceClassification.from_config(config)
```

**from\_pretrained**

[\<source>](https://github.com/huggingface/transformers/blob/v4.34.1/src/transformers/models/auto/auto_factory.py#L448)

( \*model\_args\*\*kwargs )

Parameters

* **pretrained\_model\_name\_or\_path** (`str` or `os.PathLike`) — Can be either:
  * A string, the _model id_ of a pretrained model hosted inside a model repo on huggingface.co. Valid model ids can be located at the root-level, like `bert-base-uncased`, or namespaced under a user or organization name, like `dbmdz/bert-base-german-cased`.
  * A path to a _directory_ containing model weights saved using [save\_pretrained()](https://huggingface.co/docs/transformers/v4.34.1/en/main_classes/model#transformers.PreTrainedModel.save_pretrained), e.g., `./my_model_directory/`.
  * A path or url to a _PyTorch state\_dict save file_ (e.g, `./pt_model/pytorch_model.bin`). In this case, `from_pt` should be set to `True` and a configuration object should be provided as `config` argument. This loading path is slower than converting the PyTorch model in a TensorFlow model using the provided conversion scripts and loading the TensorFlow model afterwards.
* **model\_args** (additional positional arguments, _optional_) — Will be passed along to the underlying model `__init__()` method.
* **config** ([PretrainedConfig](https://huggingface.co/docs/transformers/v4.34.1/en/main_classes/configuration#transformers.PretrainedConfig), _optional_) — Configuration for the model to use instead of an automatically loaded configuration. Configuration can be automatically loaded when:
  * The model is a model provided by the library (loaded with the _model id_ string of a pretrained model).
  * The model was saved using [save\_pretrained()](https://huggingface.co/docs/transformers/v4.34.1/en/main_classes/model#transformers.PreTrainedModel.save_pretrained) and is reloaded by supplying the save directory.
  * The model is loaded by supplying a local directory as `pretrained_model_name_or_path` and a configuration JSON file named _config.json_ is found in the directory.
* **cache\_dir** (`str` or `os.PathLike`, _optional_) — Path to a directory in which a downloaded pretrained model configuration should be cached if the standard cache should not be used.
* **from\_pt** (`bool`, _optional_, defaults to `False`) — Load the model weights from a PyTorch checkpoint save file (see docstring of `pretrained_model_name_or_path` argument).
* **force\_download** (`bool`, _optional_, defaults to `False`) — Whether or not to force the (re-)download of the model weights and configuration files, overriding the cached versions if they exist.
* **resume\_download** (`bool`, _optional_, defaults to `False`) — Whether or not to delete incompletely received files. Will attempt to resume the download if such a file exists.
* **proxies** (`Dict[str, str]`, _optional_) — A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
* **output\_loading\_info(`bool`,** _optional_, defaults to `False`) — Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages.
* **local\_files\_only(`bool`,** _optional_, defaults to `False`) — Whether or not to only look at local files (e.g., not try downloading the model).
* **revision** (`str`, _optional_, defaults to `"main"`) — The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any identifier allowed by git.
* **trust\_remote\_code** (`bool`, _optional_, defaults to `False`) — Whether or not to allow for custom models defined on the Hub in their own modeling files. This option should only be set to `True` for repositories you trust and in which you have read the code, as it will execute code present on the Hub on your local machine.
* **code\_revision** (`str`, _optional_, defaults to `"main"`) — The specific revision to use for the code on the Hub, if the code leaves in a different repository than the rest of the model. It can be a branch name, a tag name, or a commit id, since we use a git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any identifier allowed by git.
* **kwargs** (additional keyword arguments, _optional_) — Can be used to update the configuration object (after it being loaded) and initiate the model (e.g., `output_attentions=True`). Behaves differently depending on whether a `config` is provided or automatically loaded:
  * If a configuration is provided with `config`, `**kwargs` will be directly passed to the underlying model’s `__init__` method (we assume all relevant updates to the configuration have already been done)
  * If a configuration is not provided, `kwargs` will be first passed to the configuration class initialization function ([from\_pretrained()](https://huggingface.co/docs/transformers/v4.34.1/en/main_classes/configuration#transformers.PretrainedConfig.from_pretrained)). Each key of `kwargs` that corresponds to a configuration attribute will be used to override said attribute with the supplied `kwargs` value. Remaining keys that do not correspond to any configuration attribute will be passed to the underlying model’s `__init__` function.

Instantiate one of the model classes of the library (with a sequence classification head) from a pretrained model.

The model class to instantiate is selected based on the `model_type` property of the config object (either passed as an argument or loaded from `pretrained_model_name_or_path` if possible), or when it’s missing, by falling back to using pattern matching on `pretrained_model_name_or_path`:

* **albert** — [TFAlbertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/albert#transformers.TFAlbertForSequenceClassification) (ALBERT model)
* **bart** — [TFBartForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bart#transformers.TFBartForSequenceClassification) (BART model)
* **bert** — [TFBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/bert#transformers.TFBertForSequenceClassification) (BERT model)
* **camembert** — [TFCamembertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/camembert#transformers.TFCamembertForSequenceClassification) (CamemBERT model)
* **convbert** — [TFConvBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/convbert#transformers.TFConvBertForSequenceClassification) (ConvBERT model)
* **ctrl** — [TFCTRLForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/ctrl#transformers.TFCTRLForSequenceClassification) (CTRL model)
* **deberta** — [TFDebertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta#transformers.TFDebertaForSequenceClassification) (DeBERTa model)
* **deberta-v2** — [TFDebertaV2ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/deberta-v2#transformers.TFDebertaV2ForSequenceClassification) (DeBERTa-v2 model)
* **distilbert** — [TFDistilBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/distilbert#transformers.TFDistilBertForSequenceClassification) (DistilBERT model)
* **electra** — [TFElectraForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/electra#transformers.TFElectraForSequenceClassification) (ELECTRA model)
* **esm** — [TFEsmForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/esm#transformers.TFEsmForSequenceClassification) (ESM model)
* **flaubert** — [TFFlaubertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/flaubert#transformers.TFFlaubertForSequenceClassification) (FlauBERT model)
* **funnel** — [TFFunnelForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification) (Funnel Transformer model)
* **gpt-sw3** — [TFGPT2ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gpt2#transformers.TFGPT2ForSequenceClassification) (GPT-Sw3 model)
* **gpt2** — [TFGPT2ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gpt2#transformers.TFGPT2ForSequenceClassification) (OpenAI GPT-2 model)
* **gptj** — [TFGPTJForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/gptj#transformers.TFGPTJForSequenceClassification) (GPT-J model)
* **layoutlm** — [TFLayoutLMForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlm#transformers.TFLayoutLMForSequenceClassification) (LayoutLM model)
* **layoutlmv3** — [TFLayoutLMv3ForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForSequenceClassification) (LayoutLMv3 model)
* **longformer** — [TFLongformerForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/longformer#transformers.TFLongformerForSequenceClassification) (Longformer model)
* **mobilebert** — [TFMobileBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mobilebert#transformers.TFMobileBertForSequenceClassification) (MobileBERT model)
* **mpnet** — [TFMPNetForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/mpnet#transformers.TFMPNetForSequenceClassification) (MPNet model)
* **openai-gpt** — [TFOpenAIGPTForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/openai-gpt#transformers.TFOpenAIGPTForSequenceClassification) (OpenAI GPT model)
* **rembert** — [TFRemBertForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/rembert#transformers.TFRemBertForSequenceClassification) (RemBERT model)
* **roberta** — [TFRobertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta#transformers.TFRobertaForSequenceClassification) (RoBERTa model)
* **roberta-prelayernorm** — [TFRobertaPreLayerNormForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForSequenceClassification) (RoBERTa-PreLayerNorm model)
* **roformer** — [TFRoFormerForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/roformer#transformers.TFRoFormerForSequenceClassification) (RoFormer model)
* **tapas** — [TFTapasForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/tapas#transformers.TFTapasForSequenceClassification) (TAPAS model)
* **transfo-xl** — [TFTransfoXLForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/transfo-xl#transformers.TFTransfoXLForSequenceClassification) (Transformer-XL model)
* **xlm** — [TFXLMForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm#transformers.TFXLMForSequenceClassification) (XLM model)
* **xlm-roberta** — [TFXLMRobertaForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForSequenceClassification) (XLM-RoBERTa model)
* **xlnet** — [TFXLNetForSequenceClassification](https://huggingface.co/docs/transformers/v4.34.1/en/model_doc/xlnet#transformers.TFXLNetForSequenceClassification) (XLNet model)



Examples:

Copied

```
>>> from transformers import AutoConfig, TFAutoModelForSequenceClassification

>>> # Download model and configuration from huggingface.co and cache.
>>> model = TFAutoModelForSequenceClassification.from_pretrained("bert-base-cased")

>>> # Update configuration during loading
>>> model = TFAutoModelForSequenceClassification.from_pretrained("bert-base-cased", output_attentions=True)
>>> model.config.output_attentions
True

>>> # Loading from a PyTorch checkpoint file instead of a TensorFlow model (slower)
>>> config = AutoConfig.from_pretrained("./pt_model/bert_pt_model_config.json")
>>> model = TFAutoModelForSequenceClassification.from_pretrained(
...     "./pt_model/bert_pytorch_model.bin", from_pt=True, config=config
... )
```
