Neural network 预测数组为空掩码RCNN

Neural network 预测数组为空掩码RCNN,neural-network,conv-neural-network,mask,faster-rcnn,Neural Network,Conv Neural Network,Mask,Faster Rcnn,我正在处理掩码RCNN,我的预测数组为空。我认为这与记忆力有关。这是我的代码,我在其中调用预测: model.eval() with torch.no_grad(): prediction = model([img.to(device)], [target]) 当我处于调试模式并评估表达式模型([img.to(device)],[target])时,我得到以下通知: {RuntimeError}[enforce fail at CPUAllocator.cpp:64] . DefaultCPU

我正在处理掩码RCNN,我的预测数组为空。我认为这与记忆力有关。这是我的代码,我在其中调用预测:

model.eval()
with torch.no_grad():
prediction = model([img.to(device)], [target])
当我处于调试模式并评估表达式模型([img.to(device)],[target])时,我得到以下通知:

{RuntimeError}[enforce fail at CPUAllocator.cpp:64] . DefaultCPUAllocator: can't allocate memory: you 
tried to allocate 172738321924 bytes. Error code 12 (Cannot allocate memory). But when I run the code 
as a whole I do not get any errors, except that the predictions are empty. 

错误只会在调试模式下出现,当运行整个代码时,默认情况下会跳过此错误,我已多次遇到此错误。您可以尝试只在调试模式下解决它,可能您的计算机上没有足够的CPU空间。您可以尝试关闭一些不必要的应用程序。错误只会在调试模式下出现,当运行整个代码时,默认情况下会跳过此错误,我已多次遇到此错误。您可以尝试只在调试模式下解决它,可能您的计算机上没有足够的CPU空间。您可以尝试关闭一些不必要的应用程序。