CNTK
CNTK copied to clipboard
How to use 16 Bit inference in c++ ?
Simple question is there any flag to force CNTK to use 16 bit accuracy for inference ?
Best regards
You can Cast the variables to float16 and then cast the output back to float again but I'm not sure you will find much of a speedup. It might be easier to save you model to ONNX and convert it to 16bit using WinMLTools
For inference, please use ONNX Runtime (https://github.com/microsoft/onnxruntime ). Float16 on the CPU is simply casted to Float32.
Ok, thx and if i want to use half precision on the gpu ?
fp16 on the GPU should work.