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

Float16 image classification inference example python code #9866

Closed
kexinzhao opened this issue Apr 12, 2018 · 0 comments · Fixed by #10109
Closed

Float16 image classification inference example python code #9866

kexinzhao opened this issue Apr 12, 2018 · 0 comments · Fixed by #10109
Assignees
Labels
预测 原名Inference,包含Capi预测问题等

Comments

@kexinzhao
Copy link
Contributor

kexinzhao commented Apr 12, 2018

The usual scenario on the python end for float16 inference is as follows:

  1. We first train a model in float32 mode
  2. We use a float16_transpiler to modify the program desc and generate new float16 weights in the scope
  3. We run the inference engine in float16 mode to validate the correctness
  4. Use can save the program desc and the float16 weights to be used next time either on the python or c++ end.

2. We convert the float32 weights into float16, and save them on disk
3. During inference, we load the float16 weights and model, run inference engine in float16 mode.

We want to have example code on the python side to demonstrate the above steps.

@kexinzhao kexinzhao added the 预测 原名Inference,包含Capi预测问题等 label Apr 12, 2018
@kexinzhao kexinzhao self-assigned this Apr 12, 2018
@kexinzhao kexinzhao changed the title Float16 example code Float16 image classification example code Apr 12, 2018
@kexinzhao kexinzhao changed the title Float16 image classification example code Float16 image classification example python code Apr 20, 2018
@kexinzhao kexinzhao changed the title Float16 image classification example python code Float16 image classification inference example python code Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
预测 原名Inference,包含Capi预测问题等
Projects
None yet
1 participant