MCPcopy Create free account
hub / github.com/SparkAudio/Spark-TTS / forward

Method forward

sparktts/modules/encoder_decoder/feat_encoder.py:76–87  ·  view source on GitHub ↗

Args: x (torch.Tensor): (batch_size, input_channels, length) Returns: x (torch.Tensor): (batch_size, encode_channels, length)

(self, x: torch.Tensor, *args)

Source from the content-addressed store, hash-verified

74 self.project = nn.Linear(vocos_dim, out_channels)
75
76 def forward(self, x: torch.Tensor, *args):
77 """
78 Args:
79 x (torch.Tensor): (batch_size, input_channels, length)
80
81 Returns:
82 x (torch.Tensor): (batch_size, encode_channels, length)
83 """
84 x = self.encoder(x)
85 x = self.downsample(x)
86 x = self.project(x)
87 return x.transpose(1, 2)
88
89
90# test

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected