neural-network - 预测数组为空 Mask RCNN
问题描述
我正在研究 Mask RCNN,我的预测数组是空的。我认为这与记忆有关。这就是我要求预测的代码:
model.eval()
with torch.no_grad():
prediction = model([img.to(device)], [target])
当我处于调试模式并评估表达式 model([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.
解决方案
推荐阅读
- sql - SQL:Group By语句后仍有重复记录
- c# - C# WPF 生成图像访问被拒绝
- javascript - 如何从 highcharts 表中生成向下钻取数据?
- java - 处理用户给出的给定(主要)参数的常用方法是什么?
- c - CMakelists.txt;嵌套文件夹头文件未找到错误
- flutter - 将容器包装在列中会导致溢出
- javascript - javascript将id值返回到另一个函数不起作用
- pytorch - 如何从一个 TPU 设备更改所有 TPU 设备的变量?
- jquery - 项目从 Vue-cli 2.0 迁移到 3.0 后 Owl.carousel 无法工作
- python - 根据键名搜索和更新嵌套字典