Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions keras_hub/src/models/pali_gemma/pali_gemma_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ def __init__(
self.intermediate_dim = intermediate_dim

def compute_attention(self, x, mask=None):
mask = None
if mask is not None:
mask = ops.cast(mask, dtype=x.dtype) if mask is not None else None
mask = ops.cast(mask, dtype=x.dtype)
return self.attn(x, attention_mask=mask)[0]

def build(self, input_shape):
Expand Down
Loading