keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
62.13k stars 19.49k forks source link

Minor changes to asserts in keras.src.layers.attention.MultiHeadAttention #20502

Closed lcs-crr closed 1 week ago

lcs-crr commented 1 week ago

Removed another assert leading to same issue that #20340 fixed. Made _output_shape more flexible; now it can be either a scalar integer or a tuple (as previously required). Both are discussed in #19769