mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
minor fixes
This commit is contained in:
parent
9c888b4b66
commit
26f3049f4c
@ -1321,8 +1321,6 @@ class CompactRelPositionalEncoding(torch.nn.Module):
|
||||
# self.pe contains both positive and negative parts
|
||||
# the length of self.pe is 2 * input_len - 1
|
||||
if self.pe.size(0) >= T * 2 - 1:
|
||||
# Note: TorchScript doesn't implement operator== for torch.Device
|
||||
# if self.pe.dtype != x.dtype or self.pe.device != x.device:
|
||||
self.pe = self.pe.to(dtype=x.dtype, device=x.device)
|
||||
return
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user