Unverified Commit 5bc779ae authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix an error message in BigBird (#17840)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 3eed5530
...@@ -972,7 +972,7 @@ class BigBirdBlockSparseAttention(nn.Module): ...@@ -972,7 +972,7 @@ class BigBirdBlockSparseAttention(nn.Module):
if params.shape[:2] != indices.shape[:2]: if params.shape[:2] != indices.shape[:2]:
raise ValueError( raise ValueError(
"Make sure that the first two dimensions of params and indices are identical, but" "Make sure that the first two dimensions of params and indices are identical, but"
f" they are params: {params.shape[:2]} vs. indices: {params.shape[:2]}" f" they are params: {params.shape[:2]} vs. indices: {indices.shape[:2]}"
) )
num_indices_to_gather = indices.shape[-2] * indices.shape[-1] num_indices_to_gather = indices.shape[-2] * indices.shape[-1]
num_indices_to_pick_from = params.shape[2] num_indices_to_pick_from = params.shape[2]
......
...@@ -798,7 +798,7 @@ class BigBirdPegasusBlockSparseAttention(nn.Module): ...@@ -798,7 +798,7 @@ class BigBirdPegasusBlockSparseAttention(nn.Module):
if params.shape[:2] != indices.shape[:2]: if params.shape[:2] != indices.shape[:2]:
raise ValueError( raise ValueError(
"Make sure that the first two dimensions of params and indices are identical, but" "Make sure that the first two dimensions of params and indices are identical, but"
f" they are params: {params.shape[:2]} vs. indices: {params.shape[:2]}" f" they are params: {params.shape[:2]} vs. indices: {indices.shape[:2]}"
) )
num_indices_to_gather = indices.shape[-2] * indices.shape[-1] num_indices_to_gather = indices.shape[-2] * indices.shape[-1]
num_indices_to_pick_from = params.shape[2] num_indices_to_pick_from = params.shape[2]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment