mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Double limit of penalize_abs_values_gt in AttentionDownsample from 10 to 20.
This commit is contained in:
parent
6e598cb18d
commit
958d9b929d
@ -829,7 +829,7 @@ class AttentionDownsample(torch.nn.Module):
|
|||||||
scores = (src * self.query).sum(dim=-1, keepdim=True)
|
scores = (src * self.query).sum(dim=-1, keepdim=True)
|
||||||
|
|
||||||
scores = penalize_abs_values_gt(scores,
|
scores = penalize_abs_values_gt(scores,
|
||||||
limit=10.0,
|
limit=20.0,
|
||||||
penalty=1.0e-04)
|
penalty=1.0e-04)
|
||||||
|
|
||||||
weights = scores.softmax(dim=1)
|
weights = scores.softmax(dim=1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user