fastmachinelearning / hls4ml

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

hls4ml optimization/dsp_aware_pruning changing tensorflow global behavior #1092

Open calad0i opened 1 month ago

calad0i commented 1 month ago

A couple of the current tests fails if hls4ml.optimization.dsp_aware_pruning is imported prior to those tests. The code causing the issue appears to be https://github.com/fastmachinelearning/hls4ml/blob/ab457084daf2956b5beae806b20729fd9103d8ad/hls4ml/optimization/dsp_aware_pruning/keras/__init__.py#L18 Is there anyway we can avoid using this?