Skip to content

Commit 59ed824

Browse files
dsrankinvloncar
authored andcommitted
fixing SimpleRNN shape issue
1 parent 0ce874f commit 59ed824

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hls4ml/model/layers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,10 @@ class SimpleRNN(Layer):
872872
def initialize(self):
873873
if self.attributes['return_sequences']:
874874
shape = [self.attributes['n_timesteps'], self.attributes['n_out']]
875+
dims = ['N_TIME_STEPS_{}'.format(self.index), 'N_OUT_{}'.format(self.index)]
875876
else:
876-
shape = [1, self.attributes['n_out']]
877-
dims = ['N_TIME_STEPS_{}'.format(self.index), 'N_OUT_{}'.format(self.index)]
877+
shape = [self.attributes['n_out']]
878+
dims = ['N_OUT_{}'.format(self.index)]
878879

879880
self.add_output_variable(shape, dims)
880881

0 commit comments

Comments
 (0)