Skip to content

FreeRotate/TextClassificationBERT

Repository files navigation

PyTorch BERT 文本分类

预训练模型下载路径

https://huggingface.co/bert-base-chinese/tree/main

下载config.json, pytorch_model.bin, vocab.txt, 存放在pretrained/bert-base-chinese/文件夹中

pretrained
│  
└─bert-base-chinese
        config.json
        pytorch_model.bin
        vocab.txt

环境

torch==1.10.1+cu113
transformers==4.15.0
numpy==1.22.3
sklearn==0.0
scikit-learn==1.0.2
tqdm==4.62.3

使用方法

  1. 安装环境
pip install requirements.txt
  1. 运行代码
python main.py

欢迎star

About

🚀 基于PyTorch的BERT文本分类框架

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages