From d97db05a68b830257c3a06c6ebd37c4e44222aae Mon Sep 17 00:00:00 2001 From: Abheesht Date: Tue, 12 Nov 2024 03:33:28 +0530 Subject: [PATCH] Fix `return_attention_scores` bug (#1977) * Fix `return_attention_scores` bug * Keep the if...else block --- keras_hub/src/layers/modeling/transformer_encoder.py | 1 - 1 file changed, 1 deletion(-) diff --git a/keras_hub/src/layers/modeling/transformer_encoder.py b/keras_hub/src/layers/modeling/transformer_encoder.py index 5ed121e457..4f471a12dd 100644 --- a/keras_hub/src/layers/modeling/transformer_encoder.py +++ b/keras_hub/src/layers/modeling/transformer_encoder.py @@ -215,7 +215,6 @@ def call( return_attention_scores=return_attention_scores, training=training, ) - return x, attention_scores else: x = self._self_attention_layer( query=x,