PortaSpeech icon indicating copy to clipboard operation
PortaSpeech copied to clipboard

The meaning of inputs[11:] in model.loss.py

Open Dyongh613 opened this issue 2 years ago • 4 comments

HI@[keonlee9420],I cannot understand the meaning of inputs[11:] in model.loss.py

def forward(self, inputs, predictions, step): ( mel_targets, *_, ) = inputs[11:] Thank you very much!

Dyongh613 avatar May 02 '22 10:05 Dyongh613

On inputs[11:], how to decide the value(11). Thank you!

Dyongh613 avatar May 04 '22 08:05 Dyongh613

For me, I think you shoud observe the definition of a batch in module dataset.py

manhph2211 avatar May 05 '22 04:05 manhph2211

Thank you! I still cannot understand the batch in dataset.py for you said. duration_targets in inputs[3:] is tensor(8,38), while the log_duration_predictions in predictors is tensor(8,19) which got from linguistic_encoder module.  Then there will be error in get_duration_loss(self, dur_pred, dur_gt). Sorry, my English is not well!  def forward(self, model, inputs, predictions, step, coarse_mels=None, Ds=None): ( texts, _, _, _, _, _, _, mel_targets, _, _, _, duration_targets, _, ) = inputs[3:] ( mel_predictions, _, _, _, log_duration_predictions, duration_roundeds, src_masks, mel_masks, src_lens, mel_lens, alignments, dist_info, src_w_masks, alignment_logprobs, postnet_output, ) = predictions ------------------ 原始邮件 ------------------ 发件人: "keonlee9420/PortaSpeech" @.>; 发送时间: 2022年5月5日(星期四) 中午12:23 @.>; 抄送: "Rui @.@.>; 主题: Re: [keonlee9420/PortaSpeech] The meaning of inputs[11:] in model.loss.py (Issue #21)

For me, I think you shoud observe the definition of a batch in module dataset.py

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Dyongh613 avatar May 05 '22 04:05 Dyongh613

log_duration_predictions and duration_roundeds in Predictors , tensor(8,19) , both calculate from Linguistic_encoder. The duration_targets in Inputs[3:] tensor with (8,38). I see there will be some errors when I calculate the duration_loss in the same method with PortaSpeech, because the inputs[3:] duration_targets is tensor(8,38).

------------------ 原始邮件 ------------------ 发件人: "keonlee9420/PortaSpeech" @.>; 发送时间: 2022年5月5日(星期四) 中午12:23 @.>; 抄送: "Rui @.@.>; 主题: Re: [keonlee9420/PortaSpeech] The meaning of inputs[11:] in model.loss.py (Issue #21)

For me, I think you shoud observe the definition of a batch in module dataset.py

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Dyongh613 avatar May 05 '22 05:05 Dyongh613