mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Comment
This commit is contained in:
parent
2c6f5e82b2
commit
742bcaa340
@ -1017,6 +1017,9 @@ class RelPositionalEncoding(torch.nn.Module):
|
||||
pe[:, 1::2] = sines
|
||||
pe[:, -1] = 1.0 # for bias.
|
||||
|
||||
# if we have the length_factor correct, the cosines around 0 offset (T in the array)
|
||||
# should be oscillating in sign like -1, 1, -1; and the sines should all be close to
|
||||
# zero.
|
||||
#r = 2
|
||||
#print("cosines = ", cosines[T-r:T+r,-5:])
|
||||
#print("sines = ", sines[T-r:T+r,-5:])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user