mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-27 02:34:21 +00:00
black formatted
This commit is contained in:
parent
0150961a33
commit
8da57a0449
@ -75,7 +75,8 @@ class Encodec(nn.Module):
|
|||||||
reuse_cache = False
|
reuse_cache = False
|
||||||
e = self.encoder(speech)
|
e = self.encoder(speech)
|
||||||
index = torch.tensor(
|
index = torch.tensor(
|
||||||
random.randint(0, len(self.target_bandwidths) - 1), device=speech.device,
|
random.randint(0, len(self.target_bandwidths) - 1),
|
||||||
|
device=speech.device,
|
||||||
)
|
)
|
||||||
if torch.distributed.is_initialized():
|
if torch.distributed.is_initialized():
|
||||||
torch.distributed.broadcast(index, src=0)
|
torch.distributed.broadcast(index, src=0)
|
||||||
@ -173,7 +174,8 @@ class Encodec(nn.Module):
|
|||||||
reuse_cache = False
|
reuse_cache = False
|
||||||
e = self.encoder(speech)
|
e = self.encoder(speech)
|
||||||
index = torch.tensor(
|
index = torch.tensor(
|
||||||
random.randint(0, len(self.target_bandwidths) - 1), device=speech.device,
|
random.randint(0, len(self.target_bandwidths) - 1),
|
||||||
|
device=speech.device,
|
||||||
)
|
)
|
||||||
if torch.distributed.is_initialized():
|
if torch.distributed.is_initialized():
|
||||||
torch.distributed.broadcast(index, src=0)
|
torch.distributed.broadcast(index, src=0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user