Skip to content

Commit 6aebf8f

Browse files
committed
fix simple-rnn config for Keras; make test names unique
1 parent 7d03833 commit 6aebf8f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hls4ml/backends/oneapi/passes/recurrent_templates.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ def format(self, node):
373373
)
374374
simple_rnn_params['recurrent_activation'] = 'relu'
375375

376+
# In Keras there is no recurrent bias, so put a placeholder
377+
simple_rnn_params.setdefault('recurrent_bias_t', simple_rnn_params['bias_t'])
378+
376379
simple_rnn_config = self.template.format(**simple_rnn_params)
377380

378381
act_params = self._default_config_params(node)

test/pytest/test_qkeras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def test_qlstm(backend):
620620
config = hls4ml.utils.config_from_keras_model(
621621
model, granularity='name', default_precision="ap_fixed<8,1>", backend=backend
622622
)
623-
output_dir = str(test_root_path / f'hls4mlprj_qkeras_qsimplernn_{backend}')
623+
output_dir = str(test_root_path / f'hls4mlprj_qkeras_qlstm_{backend}')
624624
hls_model = hls4ml.converters.convert_from_keras_model(model, hls_config=config, output_dir=output_dir, backend=backend)
625625
hls_model.compile()
626626

0 commit comments

Comments
 (0)