Skip to content

Commit

Permalink
Fix bug introduced in Keras 3
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperemy committed Aug 13, 2024
1 parent f612f6e commit 1f4355c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tcn/tcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ def build(self, input_shape):
else:
self.output_slice_index = -1 # causal case.
self.slicer_layer = Lambda(lambda tt: tt[:, self.output_slice_index, :], name='Slice_Output')
self.slicer_layer.build(self.build_output_shape.as_list())
try:
self.slicer_layer.build(self.build_output_shape.as_list())
except AttributeError:
self.slicer_layer.build(self.build_output_shape)

def compute_output_shape(self, input_shape):
"""
Expand Down

0 comments on commit 1f4355c

Please sign in to comment.