[Misc] Improve error messages for unsupported types and parameters (#30593)
Signed-off-by: BlankR <hjyblanche@gmail.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
@@ -348,7 +348,9 @@ class GraniteSpeechConformerAttention(nn.Module):
|
||||
|
||||
if self.context_size <= 0 or self.context_size > self.max_pos_emb:
|
||||
raise ValueError(
|
||||
"Context size is either less than 0 or exceeds the max_pos_emb"
|
||||
f"Context size should be > 0 and "
|
||||
f"<= max_pos_emb ({self.max_pos_emb}), "
|
||||
f"got {self.context_size}."
|
||||
)
|
||||
|
||||
def forward(
|
||||
|
||||
Reference in New Issue
Block a user