提交 b2841ce8 编写于 作者: T tensor-tang

fix api fetch

test=release/0.15.0
上级 3a1df4e7
......@@ -275,7 +275,7 @@ bool NativePaddlePredictor::GetFetch(
if (buffer.empty() || buffer.length() < sizeof(float) * data.size()) {
buffer.Resize(sizeof(float) * data.size());
}
std::memcpy(buffer.data(), data.data(), buffer.length());
std::memcpy(buffer.data(), data.data(), sizeof(float) * data.size());
// copy LoD
for (const auto &level : fetchs[i].lod()) {
outputs->at(i).lod.emplace_back(level);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册