taishan1994 / pytorch_bert_multi_classification

基于pytorch_bert的中文多标签分类
82 stars 14 forks source link

测试时候出现cuda out of memory #2

Closed xiacoder closed 2 years ago

xiacoder commented 2 years ago

模型训练结束后,进行测试时候报了cuda out of memory model, optimizer, epoch, loss = self.load_ckp(model, optimizer, checkpoint)这一行代码

taishan1994 commented 2 years ago

模型训练结束后,进行测试时候报了cuda out of memory model, optimizer, epoch, loss = self.load_ckp(model, optimizer, checkpoint)这一行代码

那是因为GPU显存不够,调小测试时的batch_size