1

I am working on Mask RCNN and my prediction array is empty. I think it has to do with memory. This is what my code where I call for the predictions:

model.eval()
with torch.no_grad():
prediction = model([img.to(device)], [target])

When I am in debug mode and I evaluate the expression model([img.to(device)], [target]) I get the following notifcation:

{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. 
E.W
  • 11
  • 2
  • Errors will only come in debug mode, and when run the whole code this error gets skipped by default it has occurred many times with me. you can try to solve it in debug mode only and maybe there is no enough space on you computer in CPU. You can try to close some unnecessary applications. – deepak sen May 07 '20 at 10:42

0 Answers0