Skip to content

Commit 19551d6

Browse files
authored
Fix shape passed to inner EinsumDense in XLNET attention. (#2751)
A reccent fix in Keras keras-team/keras#23000 uncovered an issue whereby a call to EinsumDense.compute_output_shape was passing an int instead of an input shape.
1 parent 568946d commit 19551d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

keras_hub/src/models/xlnet/relative_attention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def build(self, content_stream_shape):
192192
**self._get_common_kwargs_for_sublayer(),
193193
)
194194
self._output_dense.build(
195-
self._value_dense.compute_output_shape(self._value_dim)
195+
self._value_dense.compute_output_shape(self._value_shape)
196196
)
197197

198198
einsum_equation, _, output_rank = _build_proj_equation(

0 commit comments

Comments
 (0)