fastmachinelearning / hls4ml

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

Does HLS4ML support Tensorflow (without Keras) in Conv2D/Conv1D?? #396

Closed IanCheng18 closed 2 years ago

IanCheng18 commented 3 years ago

Does HLS4ML support Tensorflow (without Keras) in Conv2D/Conv1D? I didn't see any converters for TensorFlow instead, but there is a lot for Keras.

I gave up using Keras since I am using lambda layer, or is there any good workaround?

Many thanksssssss

thesps commented 3 years ago

Hi, yes there is a TensorFlow converter. However you will find that a lambda operation is not supported - hls4ml cannot generate HLS from arbitrary functions. I'd recommend you try to implement what you need from only the supported layers (try print(hls4ml.converters.get_supported_keras_layers())). If you still need to do something very custom, the process to support a custom layer through hls4ml conversion is to: