lord-reso commited on
Commit
36c1354
·
verified ·
1 Parent(s): ee51773

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +4 -1
model.py CHANGED
@@ -186,7 +186,10 @@ class Encoder(nn.Module):
186
 
187
  return outputs
188
 
189
- def inference(self, x):
 
 
 
190
  for conv in self.convolutions:
191
  x = F.dropout(F.relu(conv(x)), 0.5, self.training)
192
 
 
186
 
187
  return outputs
188
 
189
+ def inference(self, x, speaker_embedding):
190
+ # Modify the input x to concatenate the speaker embedding
191
+ x = torch.cat((x, speaker_embedding.unsqueeze(1).expand(-1, x.size(1), -1)), dim=-1)
192
+
193
  for conv in self.convolutions:
194
  x = F.dropout(F.relu(conv(x)), 0.5, self.training)
195