场景文字识别使用GPU训练后,怎么在预测的时候不可以用CPU
Created by: yeyupiaoling
在场景文字识别的例子中:https://github.com/PaddlePaddle/models/tree/develop/scene_text_recognition 训练是一定要GPU,但是预测是可以不用的,如这个代码:https://github.com/PaddlePaddle/models/blob/9264e8cebb0219a9cd765511b8a7c9236f0b1da8/scene_text_recognition/network_conf.py#L81-L89 但是在真正的实际上,在预测使用CPU是报错:
F0403 08:36:29.233067 3738 Allocator.h:54] Check failed: posix_memalign(&ptr, 4096ul, size) == 0 (12 vs. 0)
*** Check failure stack trace: ***
@ 0x7f2cf5f3e2cd google::LogMessage::Fail()
@ 0x7f2cf5f40618 google::LogMessage::SendToLog()
@ 0x7f2cf5f3dddb google::LogMessage::Flush()
@ 0x7f2cf5f414ee google::LogMessageFatal::~LogMessageFatal()
@ 0x7f2cf5e9ca91 paddle::PoolAllocator::alloc()
@ 0x7f2cf5e95d25 paddle::CpuMemoryHandle::CpuMemoryHandle()
@ 0x7f2cf5e50c93 paddle::CpuMatrix::CpuMatrix()
@ 0x7f2cf5e50e1e paddle::Matrix::create()
@ 0x7f2cf5e61518 paddle::Matrix::resizeOrCreate()
@ 0x7f2cf5c49fa7 paddle::Layer::resetSpecifyOutput()
@ 0x7f2cf5c4a212 paddle::Layer::resetOutput()
@ 0x7f2cf5d1b331 paddle::BatchNormalizationLayer::forward()
@ 0x7f2cf5b3fe3f paddle::NeuralNetwork::forward()
@ 0x7f2cf5ac0d86 _wrap_GradientMachine_forward
@ 0x4bc3fa PyEval_EvalFrameEx
@ 0x4c136f PyEval_EvalFrameEx
@ 0x4b9ab6 PyEval_EvalCodeEx
@ 0x4c1e6f PyEval_EvalFrameEx
@ 0x4d4c9d (unknown)
@ 0x4bc9b6 PyEval_EvalFrameEx
@ 0x4d4c9d (unknown)
@ 0x4bc9b6 PyEval_EvalFrameEx
@ 0x4b9ab6 PyEval_EvalCodeEx
@ 0x4c16e7 PyEval_EvalFrameEx
@ 0x4c136f PyEval_EvalFrameEx
@ 0x4c136f PyEval_EvalFrameEx
@ 0x4b9ab6 PyEval_EvalCodeEx
@ 0x4eb30f (unknown)
@ 0x4e5422 PyRun_FileExFlags
@ 0x4e3cd6 PyRun_SimpleFileExFlags
@ 0x493ae2 Py_Main
@ 0x7f2d1325b830 __libc_start_main