Skip to content

[FastSpeech2] Variance can be None but it is used in forward() #291

@SamuelLarkin

Description

@SamuelLarkin

FastSpeech2's variance adaptor can be set to None and later we try to use it in the forward pass.

  1. When constructing a FastSpeech2(), on line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L33 we expect a stats and by default it is None.
  2. We keep a reference to stats https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L49.
  3. If stats is None on line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L79, we set the variance_adaptor to None at line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L84. We then log an error.
  4. During the forward() pass, we calculate variance at line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L162 regardless if the member is None

What should happen when the variance is not set?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions