Skip to content

dtype mismatch in AttentiveStatisticsPooling with FP16 training mode #2544

Description

@MM-0712

Describe the bug

attn = torch.cat([x, mean, std], dim=1)

If the model is trained with FP16 or BF16 mode, here will report dtype mismatch.
So, one solution is that it need add .to(x.dtype).

Expected behaviour

None

To Reproduce

None

Environment Details

No response

Relevant Log Output

No response

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions