未验证 提交 0dbc5235 编写于 作者: X xiebaiyuan 提交者: GitHub

Merge pull request #1083 from hjchen2/dev-latest

Fix a bug while loading model
...@@ -112,7 +112,9 @@ void Executor<Dtype, P>::LoadMemory( ...@@ -112,7 +112,9 @@ void Executor<Dtype, P>::LoadMemory(
uint32_t version = *(reinterpret_cast<uint32_t *>(*data_buf)); uint32_t version = *(reinterpret_cast<uint32_t *>(*data_buf));
*data_buf += sizeof(uint32_t); *data_buf += sizeof(uint32_t);
// lod information // lod information
uint64_t lod_level = *(reinterpret_cast<uint64_t *>(*data_buf)); // uint64_t lod_level = *(reinterpret_cast<uint64_t *>(*data_buf));
uint64_t lod_level = 0;
memcpy(&lod_level, *data_buf, sizeof(uint64_t));
*data_buf += sizeof(uint64_t); *data_buf += sizeof(uint64_t);
auto *lod = tensor->mutable_lod(); auto *lod = tensor->mutable_lod();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册