Skip to content

Commit 5b80566

Browse files
committed
crop dimname fix
1 parent 1d9b0f5 commit 5b80566

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

hls4ml/model/layers.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,8 +911,7 @@ def initialize(self):
911911
inp = self.get_input_variable()
912912
# no data_format attribute for Cropping1D
913913
shape = [self.attributes['out_width'], self.attributes['n_chan']]
914-
dims = [f'OUT_WIDTH_{self.index}', f'N_CHAN_{self.index}']
915-
self.add_output_variable(shape, dims, precision=inp.type.precision)
914+
self.add_output_variable(shape, precision=inp.type.precision)
916915

917916

918917
class Cropping2D(Layer):
@@ -932,11 +931,9 @@ def initialize(self):
932931
inp = self.get_input_variable()
933932
if self.get_attr('data_format') == 'channels_last':
934933
shape = [self.attributes['out_height'], self.attributes['out_width'], self.attributes['n_chan']]
935-
dims = [f'OUT_HEIGHT_{self.index}', f'OUT_WIDTH_{self.index}', f'N_CHAN_{self.index}']
936934
else:
937935
shape = [self.attributes['n_chan'], self.attributes['out_height'], self.attributes['out_width']]
938-
dims = [f'N_CHAN_{self.index}', f'OUT_HEIGHT_{self.index}', f'OUT_WIDTH_{self.index}']
939-
self.add_output_variable(shape, dims, precision=inp.type.precision)
936+
self.add_output_variable(shape, precision=inp.type.precision)
940937

941938

942939
class Activation(Layer):

0 commit comments

Comments
 (0)