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

重载IInt8EntropyCalibrator2中getBatch函数时出错 #96

Open
zhjw0927 opened this issue Sep 21, 2023 · 0 comments
Open

重载IInt8EntropyCalibrator2中getBatch函数时出错 #96

zhjw0927 opened this issue Sep 21, 2023 · 0 comments

Comments

@zhjw0927
Copy link

hi,我在量化模型时,继承了IInt8EntropyCalibrator2类。在继承类的构造函数中,初始化了sizaMap<std::string, size_t> 成员变量,方便在getBatch函数中去调取不同input node的size。但是,我发现在量化过程运行时(即调用getBatch时),使用input node name去选取sizeMap时,发生了错误。debug发现,构造函数中初始化的sizeMap在成员函数getBatch中,key发生了乱码。这样的问题,也发生在readCalibrationCache中。

参考的示例代码是https://github.com/NVIDIA/trt-samples-for-hackathon-cn/blob/master/cookbook/02-API/INT8-PTQ/C%2B%2B/calibrator.cpp。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant