ResourceExhaustedError: OOResourceExhaustedError: OOM when allocating tensor with shapeM when allocating tensor with shape
时间:2021-03-16 13:56:03
收藏:0
阅读:0
原因:是因为gpu显存太小而导致的错误。
解决方法:
1.将batch_size改小
2.不用gpu训练,改用cpu训练
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
评论(0)