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

[TODO] Re-release flatc with some customizations of our own to address the lack of arithmetic precision of the quantization parameters #196

Closed
PINTO0309 opened this issue Feb 21, 2023 · 0 comments
Labels
feature request feature request third party Third-party tool issues

Comments

@PINTO0309
Copy link
Owner

PINTO0309 commented Feb 21, 2023

Issue Type

Others

onnx2tf version number

1.7.2

onnx version number

1.13.1

tensorflow version number

2.12.0rc0

Download URL for ONNX

N/A

Parameter Replacement JSON

N/A

Description

  1. Personal
  2. [TODO] Re-release flatc with some customizations of our own to address the lack of arithmetic precision of the quantization parameters
  3. Source code
    https://github.com/PINTO0309/flatbuffers
  • flatbuffers/include/flatbuffers/util.h

    • From:
      template<> inline std::string NumToString<double>(double t) {
        return FloatToString(t, 12);
      }
      template<> inline std::string NumToString<float>(float t) {
        return FloatToString(t, 6);
      }
    • To:
      template<> inline std::string NumToString<double>(double t) {
        return FloatToString(t, 12);
      }
      template<> inline std::string NumToString<float>(float t) {
        return FloatToString(t, 17);
      }
  • build

    cd flatbuffers && mkdir build && cd build
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
    make -j$(nproc)

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request third party Third-party tool issues
Projects
None yet
Development

No branches or pull requests

1 participant