【发布时间】:2021-10-12 14:36:45
【问题描述】:
我正在尝试使用 BERT a 微调 Spacy NER 模型
#Train the data
!python -m spacy train -g 0 config_spacy_bert.cfg --output ./output --paths.train ./train.spacy --paths.dev ./train.spacy
配置文件中的批量大小为 2,我收到一个错误
RuntimeError: CUDA out of memory. Tried to allocate 18.00 MiB (GPU 0; 1.96 GiB total capacity; 958.13 MiB already allocated; 11.25 MiB free; 978.00 MiB reserved in total by PyTorch)
如何消除这个错误
【问题讨论】: