Skip to content

Commit

Permalink
Avoid None shape entries in TimeDistributed
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jun 25, 2024
1 parent 9cfe208 commit b038ce2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras/src/layers/rnn/time_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def build(self, input_shape):
self.built = True

def call(self, inputs, training=None, mask=None):
input_shape = inputs.shape
mask_shape = None if mask is None else tuple(mask.shape)
input_shape = ops.shape(inputs)
mask_shape = None if mask is None else ops.shape(mask)
batch_size = input_shape[0]
timesteps = input_shape[1]

Expand Down

0 comments on commit b038ce2

Please sign in to comment.