File tree Expand file tree Collapse file tree 3 files changed +17
-14
lines changed
Expand file tree Collapse file tree 3 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 3333except ImportError :
3434 __qkeras_profiling_enabled__ = False
3535
36- _activations = list ()
36+ __keras_activations = list ()
3737if __keras_profiling_enabled__ :
38- _activations .append (keras .layers .Activation )
38+ __keras_activations .append (keras .layers .Activation )
3939if __qkeras_profiling_enabled__ :
40- _activations .append (qkeras .qactivations )
40+ __keras_activations .append (qkeras .QActivation )
4141
4242
4343def get_unoptimized_hlsmodel (model ):
@@ -602,7 +602,7 @@ def get_ymodel_keras(keras_model, X):
602602 if (
603603 hasattr (layer , 'activation' )
604604 and layer .activation is not None
605- and not isinstance (layer , _activations )
605+ and not isinstance (layer , tuple ( __keras_activations ) )
606606 and layer .activation .__name__ != 'linear'
607607 ):
608608 tmp_activation = layer .activation
Original file line number Diff line number Diff line change 22import webbrowser
33from ast import literal_eval
44
5- from calmjs .parse import asttypes , es5
6- from tabulate import tabulate
7-
85
96def parse_quartus_report (hls_dir , write_to_file = True ):
107 '''
@@ -53,6 +50,8 @@ def read_quartus_report(hls_dir, open_browser=False):
5350 Returns:
5451 None
5552 '''
53+ from tabulate import tabulate
54+
5655 report = parse_quartus_report (hls_dir )
5756
5857 print ('HLS Resource Summary\n ' )
@@ -100,6 +99,7 @@ def read_js_object(js_script):
10099 Returns:
101100 Dictionary of variables defines in script
102101 '''
102+ from calmjs .parse import asttypes , es5
103103
104104 def visit (node ):
105105 if isinstance (node , asttypes .Program ):
Original file line number Diff line number Diff line change @@ -22,16 +22,9 @@ description_file = README.md
2222[options]
2323packages = find:
2424install_requires =
25- calmjs.parse
2625 h5py
2726 numpy
28- onnx>=1.4.0
29- pydigitalwavetools ==1.1
3027 pyyaml
31- qkeras
32- tabulate
33- tensorflow
34- tensorflow-model-optimization<=0.7.5
3528python_requires = >=3.10
3629include_package_data = True
3730scripts = scripts/hls4ml
@@ -51,14 +44,24 @@ profiling =
5144 matplotlib
5245 pandas
5346 seaborn
47+ qkeras =
48+ qkeras
49+ tensorflow
50+ tensorflow-model-optimization<=0.7.5
51+ quantus_report =
52+ calmjs.parse
53+ tabulate
5454sr =
5555 sympy
5656testing =
5757 HGQ~=0.2.0
58+ calmjs.parse
59+ onnx>=1.4.0
5860 pytest
5961 pytest-cov
6062 pytest-randomly
6163 qonnx
64+ tabulate
6265 torch
6366
6467[check-manifest]
You can’t perform that action at this time.
0 commit comments