Skip to content

How to load params in C++ deploy? #600

@WolffyChen

Description

@WolffyChen

Hi all,

I use python fuction "nnvm.compiler.save_param_dict(params)" to generate "deploy.params".
Then I load it by "bytearray(open('deploy.params', "rb").read())" in python and run the deploy code successfully.
But when I try to deploy in c++ and use function "LoadParams" to load "deploy.params" that created in python, the program crashed with an error: "../src/runtime/graph/graph_runtime.cc:404: Check failed: strm->Read(&reserved) Invalid parameters file format".
The file's binary content in c++ is same with bytearray in python. Why this error happened and how I can fix it?

Thank you very much!
Hope Reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions