文章目录
1 加载库和设置通用参数
import pandas as pd
import torch
import transformers
from transformers import DistilBertTokenizerFast
from transformers import DistilBertForSequenceClassification
torch.backends.cudnn.deterministic = True # 用于固定cuda的随机数种子
RANDOM_SEED = 123
torch.manual_seed(RANDOM_SEED)
标签:BERT,transformers,16,模型,torch,import,文本,数据,加载
From: https://blog.csdn.net/qq_20466211/article/details/142342935