I had the same exact issue. The hint is in the comments in the one_step_attention():
# Use concatenator to concatenate a and s_prev on the last axis (≈ 1 line)
# For grading purposes, please list 'a' first and 's_prev' second, in this order.
@kecai@salman0149 could you please elaborate more because previously it was defined to concatenate using the last axis:
# Defined shared layers as global variables
...
concatenator = Concatenate(axis=-1)
And in the one_step_attention:
...
s_prev = repeator(...)
# Use concatenator to concatenate a and s_prev on the last axis (≈ 1 line)
# For grading purposes, please list 'a' first and 's_prev' second, in this order.
concat = concatenator([..., ...])
But I get a similar dimensions mismatch error in the modelf() function
You’ve replied on a thread that hasn’t been used in three years. So the information in this thread may no longer apply - the assignments tend to be updated occasionally.
In the concat = ... line, you only need to call concatenator() with a list of the correct parameter. The axis=-1 was already defined earlier.