fastmachinelearning / hls4ml

Machine learning on FPGAs using HLS
https://fastmachinelearning.org/hls4ml
Apache License 2.0
1.16k stars 386 forks source link

The hls4ml transformation successful, however, the result of inference all zeros. #980

Closed cantonsir closed 3 months ago

cantonsir commented 3 months ago

I am currently using the hls4ml tool to convert a neural network, but the converted network is encountering some issues.

After converting to hls4ml files and then performing inference, the results are all zeros, which suggests there may be a bug somewhere.

The original neural network, which is based on Keras, works perfectly fine for inference.

My expectation is that, after converting to hls4ml files, the inference should yield approximate results to the original Keras-based model.

Code: https://colab.research.google.com/drive/1FNPvNIoaOCAdPsRIUdxp6TfVFZirgAPb?usp=sharing

cantonsir commented 3 months ago

Just training the model again, that could solve the problem