Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NODE][Serialization]fix serialization precision loss in float #4503

Merged
merged 2 commits into from
Dec 12, 2019

Commits on Dec 11, 2019

  1. fix serialization precision loss in float

    When we want to serialize a tvm.tensor object(like pickle), we will get a precision loss cause by std::to_string()。
    For example, a2.value will be 0.0 while a.value=0.00000001 in the following: 
        import tvm
        import pickle
        a = tvm.const(0.00000001, 'float32')
        a2 = pickle.loads(pickle.dumps(a))
    HisiFish authored Dec 11, 2019
    Configuration menu
    Copy the full SHA
    016c0e0 View commit details
    Browse the repository at this point in the history
  2. remove line end spaces

    HisiFish authored Dec 11, 2019
    Configuration menu
    Copy the full SHA
    82760d2 View commit details
    Browse the repository at this point in the history