-------------------------------------------- C++ Call Stacks (More useful to developers): -------------------------------------------- Windows not support stack backtrace yet. ------------------------------------------ Python Call Stacks (More useful to users): ------------------------------------------ File "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/framework.py", line 1843, in append_op attrs=kwargs.get("attrs", None)) File "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 9597, in relu6 attrs={'threshold': threshold}) File "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py", line 171, in conv_bn_layer return fluid.layers.relu6(bn) File "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py", line 198, in inverted_residual_unit name=name + '_expand') File "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py", line 252, in invresi_blocks name=name + '_' + str(i + 1)) File "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py", line 110, in net name='conv' + str(i)) File "test.py", line 107, in run emb = model.net(image) File "test.py", line 318, in main testor.run() File "test.py", line 323, in <module> main() ---------------------- Error Message Summary: ---------------------- Error: Fail to allocate CPU memory: size = 114987136 . [Hint: p should not be null.] at (E:\Paddle\paddle\fluid\memory\detail\system_allocator.cc:61) [operator < relu6 > error]
时间: 2023-08-15 12:57:59 浏览: 522
根据给出的Python调用栈信息,您遇到了一个内存分配错误。错误消息提示在 E:\Paddle\paddle\fluid\memory\detail\system_allocator.cc 的第 61 行出现了一个空指针错误。同时,调用栈显示了涉及的函数调用序列:
1. 在 "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/framework.py" 的第 1843 行,调用了 append_op 函数。
2. 在 "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/layer_helper.py" 的第 43 行,调用了 append_op 函数。
3. 在 "/data/yourenchun/share/projects/renzheng/liuyi/liuyi_env/Python-2.7.14/lib/python2.7/site-packages/paddle/fluid/layers/nn.py" 的第 9597 行,调用了 relu6 函数。
4. 在 "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py" 的第 171 行,调用了 conv_bn_layer 函数。
5. 在 "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py" 的第 198 行,调用了 inverted_residual_unit 函数。
6. 在 "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py" 的第 252 行,调用了 invresi_blocks 函数。
7. 在 "/data/yourenchun/share/projects/renzheng/slurm/dist_arcface/models/mnasnet.py" 的第 110 行,调用了 net 函数。
8. 在 "test.py" 的第 107 行,调用了 run 函数。
9. 在 "test.py" 的第 318 行,调用了 model.net(image)。
10. 在 "test.py" 的第 323 行,调用了 testor.run()。
11. 在 "test.py" 的第 323 行,调用了 main 函数。
根据错误消息和调用栈信息,问题可能出现在您的代码中的某个地方导致内存分配失败。您可以检查相关代码,确保内存分配和释放的正确性,并确保所需的内存不超过系统可用内存。此外,还可以考虑减小输入数据的规模或使用更高效的算法来降低内存需求。
如果您需要更详细的帮助,请提供更多关于代码和环境的信息。
阅读全文